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.
Try to care about boundary cases :)
">= 22" should be "> 22"
Ref :
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN
What about it didn't work? Was there an error message? What was the message?
The answer to your question is yes...but seriously not really, just a few mistakes.
1.) You need to put the return statement outside the 'for' loop. Otherwise it will only loop once then return (only doing the first item in list).
2.) You need to invert the value by multiplying by -1, not 1. Multiplying by -1 gives the inverse, multiplying by 1 gives the number.
3.) You need to check that store[i] is not zero, if it is zero, you must leave it as it is, else you need to invert it (conditional to check if zero).