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.
Note: If the input string contains no digits, this solution will return a 0, which might be unexpected behavior. By contrast,
parseInt()
and unary+
coercion will result inNaN
.its so nice but you have to knew these methodes then you can solve this kata;
best of the best =D
lol
wtf?! 😒
Great!
This is the most succinct solution, but as I have seen and noted before with other kata, the requirements imply the need to change the array in place:
In a real-world, professional situation, we would seek clarification of the intended requirements before proceeding, and we would update the written requirements accordingly.