- if
- else
if - else
examples/js/if_else_statement.js
"use strict"; var x = 23; var y = 42; if (x < y) { console.log(x + ' is smaller than ' + y); } else { console.log(x + ' is NOT smaller than ' + y); } // 23 is smaller than 42
if () { ... } else { if () { ... } else { if () { ... } } }