Ad
  • Custom User Avatar

    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%!

  • Custom User Avatar

    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?

  • Custom User Avatar

    just wanted to refactor a little, but it was kinda cheap really.
    your contribution was way more significant lol

  • Custom User Avatar

    Yeah, that's nice. No old code from previous solutions ;)

    Good job!

  • Custom User Avatar
  • Custom User Avatar

    Not sure if my version is good for production code, but it's short and will work for any valid cases :D