"Call a built-in" is a worthless kata idea.
you gotta be more clear in your instructions
You probably right. But how I should react there is a lot of unresolved issues.
Being simple is not an issue. The kata is just targeted towards beginners.
I remember a user getting stuck at a similar kata because he reassigned a variable instead of using mutating functions.
It's easy to forget what it is like to be a beginner.
Yep. Your function returns undefined and the tests pass it as the argument to your function again.
Using push on undefined causes the error.
I've passed the kata. Just trying to understand the guts of the call stack.
This is the line that causes the error:
addWord(addWord(list, 'how are you'), 'goodbye');
So I'm guessing that because the nested call to addWord hasn't returned 'goodbye' cannot be appended.
Why have you commented out the return statement? Your function should return the array after appending to it.
This comment is hidden because it contains spoiler information about the solution
Random test cases needed.
Test Passed: Value == ["hello"]
TypeError: Cannot call method 'push' of undefined
too simple yet
Python solution kumited