I know that in Java if I write condition1 & condition2
, Java will check both conditions and even if condition1
is already false, Java will check condition2
and then decide.
On the other hand when writing condition1 && condition2
if condition1
is false it wont check condition2
.
Does it work the same in JavaScript/TypeScript?