yes but it makes it clearer to do isWearingGlasses == true
Your variables are already booleans, so you can just write:
if (wearing_glasses and is_brightly_lit)
gandalf_der_12te@discuss.tchncs.de 3 hours ago
Your variables are already booleans, so you can just write:
if (wearing_glasses and is_brightly_lit)
yes but it makes it clearer to do isWearingGlasses == true
pretzelz@lemmy.world 4 hours ago
Are they though? Maybe they are inputs that haven’t been sanitised but the language has two kinds of equals and is you use the double equals then it tries to coerce it for you. Lol that with would be silly!