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.
"Call a built-in" is a worthless kata idea.
This comment is hidden because it contains spoiler information about the solution
Random test cases needed.
addWord(array, string){
array.push(string)
array=this.array
}
gives
Test Passed: Value == ["hello"]
TypeError: Cannot call method 'push' of undefined
at addWord
Tests are not testing the rights things in the right time and mislead to wrong assumption.
It is not clarrified that function must return the modified list. It is not clarified that the function should modify the list given as parameter.
It could be interesting to have a quick discussion on parameters passed by reference and by value in JS.
It could be more natural to add a function to the array prototype instead of creating a function.
Point out it should return the list
You should use a proper value for
list
in the example: