Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You can simnplify your code by using list comprehension for creating 'phrase_list' and 'new_indexes'. You could also use enumerate(indexes) to loop through the indexes and insert the word at a specified location.
This comment is hidden because it contains spoiler information about the solution
In the attempt I've passed all test, but it return this error:
===
TypeError: Cannot read property 'length' of null
at comp
at /home/codewarrior/index.js:34:19
at /runner/frameworks/javascript/cw-2.js:152:11
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at describe
at /home/codewarrior/index.js:16:5
at /home/codewarrior/index.js:117:5
at Object.handleError
I have tried my solution on node.js and it doesn't complain about this error.
I'm not sure it's the only problem with your code, but it returns False if both arrays are empty (the description requires to return False if they are
None
, but not if they are empty).This comment is hidden because it contains spoiler information about the solution