you are viewing a single comment's thread
view the rest of the comments
[–] 47 points 2 years ago (1 child)

Agreed. OP was doing well until they replaced the if statements with ‚function call || throw error’. That’s still an if statement, but obfuscated.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 2 years ago (1 child)

    Don't mind the || but I do agree if you're validating an input you'd best find all issues at once instead of "first rule wins".

  • source
  • parent
  • hideshow 2 child comments