PROJET AUTOBLOG


Shaarli - le hollandais volant

Site original : Shaarli - le hollandais volant

⇐ retour index

Hmm-la-bd - Condition

vendredi 20 mars 2015 à 15:18
Il m’est déjà arrivé de faire ça…

En fait, il peut y avoir une autre solution : la variable contient du texte ou un nombre.

Même si, là, il aurait pu faire plus simple :
if (is_boolean(myVar)) { return myVar }
else { // cas où myVar n’est pas booléen)
}
— (permalink)