samedi 16 mars 2019

JS equivalent to Ruby's return if

In Ruby i can use return if variable != 1 as example to not run the code comming after the return. I need to do the same in JS but i dont want to use a full if (variable != 1) { My code here } statement. Is that possible?

Aucun commentaire:

Enregistrer un commentaire