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.
This comment is hidden because it contains spoiler information about the solution
Javascript's initial code:
The function is
createPhoneNumber
and its argument isnumbers
. If you do something like this:It doesn't matter if you call your function like this:
createPhoneNumber([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
the answer will be"(123) 456-7890"
instead of"(111) 111-1111"
. And that's what's wrong with your code.The question did not provide any required function, parameter or argument names, so I'm not sure what you mean.
There is no issue with the tests, your code isn't using the function's argument, so, no matter which value you call your function with, the answer will be the same.
There seems to be an issue with this test.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Overall, this was good practice. I think the kata should allow for the user to produce their own variable names. When I created my own variables, my solution failed despite the code being correct.
This might be my favorite.
This comment is hidden because it contains spoiler information about the solution