mardi 11 mai 2021

Can this If statement be written in one line?

Is there a one line way of doing a if statement that only fires once with a boolean?

var boolean;    
if (!boolean) {
        function doSomething();
        boolean = true;
}

Something in the lines of this.

Aucun commentaire:

Enregistrer un commentaire