JavaScript If Statements
up:: JavaScript
If Statements
if (condition){
codeblock
}- comparing to values:
==- normally, js coerces one type to another:
'1' == 1is true (string to number)
- normally, js coerces one type to another:
- type match:
===typeofshows the type
- not equal:
!= - logical and
&& - logical or
||