Javascript pseudocode is fine, I kept asking because I didn't understand the intent of your code, not because it didn't work.
But yeah, the validations are not important, what I wanted to discuss is the construct in general, my particular case was just an example, so thanks for your input!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Javascript pseudocode is fine, I kept asking because I didn't understand the intent of your code, not because it didn't work.
But yeah, the validations are not important, what I wanted to discuss is the construct in general, my particular case was just an example, so thanks for your input!