samedi 21 mars 2015

Confusion with if(something){} and if(something == true){}

I sometimes see people on youtube writing just



if(something) { ...; }


instead of



if(something == true) { ...; }


What is the rule for using if-statement like this? Is it because if-statement by default check if something is true?


Aucun commentaire:

Enregistrer un commentaire