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.
Does it iterates numbers array twice?
No, you're wrong bro it can't convert string to number I asked Chatgpt and he said no It can't;
In this little assignment you are given a string of space separated numbers
so goodness
How simple it is...
can anyone tell me what is the difference between mine and this solution? like why we shoould do it in this way only?
well nevermind i'am blind sometimes 🤣🤣🤣🤣
and what if there are letters in numbers, i know it sounds weird but i mean where in the text its said there will only be numbers?
Sorry, wil do!
Use spoiler flag next time please, your post was visible in the homepage discourse.
This comment is hidden because it contains spoiler information about the solution
I ended up doing this with too many extra steps lol
Well done!
MDN recommends using a reduce function instead.To paraphrase: spread (...) will either fail or return the wrong result if the array has too many elements, because they try to pass the array elements as function parameters. The reduce solution does not have this problem.
Eyy I actually made an optimal solution for once!
Loading more items...