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.
As I said, it's good for this Kata, but I will not recommend to use it for work. At least, if you don't check what you are going to eval() :D
I think it's still possible to use it if you 100% sure about what will be given as parameter.
I had to solve one task (not Kata, but not work as well) and I had to use eval(), because it saved a lot of execution time. It was like ' expression + expression + ... ' and when I called string like that with eval I saved about 75-80%!
First what i found about eval() on MDN:
"Warning: Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use eval(). See Never use eval()!, below."
Is it ok?
just wanted to refactor a little, but it was kinda cheap really.
your contribution was way more significant lol
Yeah, that's nice. No old code from previous solutions ;)
Good job!
Cool
Not sure if my version is good for production code, but it's short and will work for any valid cases :D