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.
OP solved it, closing
loop through the array of numbers (
[1,2,4,8,16]
), check ifn
(2
) is within it using your language's builtin function (if any) or another loop if not any!Sorry, I don't know JavaScript. I think you would find help sooner if you posted at least part of your code here.
This comment is hidden because it contains spoiler information about the solution
You have to test if it's an array before trying to sort it.
i'm sorting an array especialy array1 & array2? i don't know
like that
array1.sort((a,b) => a - b);
array2.sort((a,b) => a - b);
You need to make sure what you're trying to sort is an array first.
my solution passes all the test but not one in basic test that says
TypeError: Cannot read property 'sort' of null
at comp
at /home/codewarrior/index.js:28:19
at /runner/frameworks/javascript/cw-2.js:152:11
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at Object.describe
at /home/codewarrior/index.js:13:10
at /home/codewarrior/index.js:80:5
at Object.handleError
where do you think the problem is, and what does mean that message?
so it does work that way,thanks a lot anter69 for the clarification :)
Anyone who has completed the kata.
okey thanks a lot, who has the right to translate challenges?
As soon as someone translates it ;-)
when JavaScript Translation?
what's the role of the number 10 here?
Loading more items...