In its most simple form, an if condition can be used like this:
var i = 0;
if (i < 1) {
console.log("i is smaller than 1");
}
The condition i < 1 is evaluated, and if it evaluates to true the block that follows is executed. If it evaluates to false, the block is skipped....