Introduction to the JavaScript if else statement. The statements are executed, one by one, in the same order as they are written. The condition is evaluated before executing the statement. You can add white space to your script to make it more readable. called simply JavaScript code. You will learn everything in future However, the && operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value. { statement(s) to be executed if expression is true } else { statement(s) to be executed if expression is false } Here JavaScript expression is evaluated, if the resulting value is true, given statement(s) in the if block, are executed. I’ll also teach you about all the cool stuff that you can do with booleans! So depending on the output of the condition, the flow of program execution will be decided. JavaScript functions: Note: You will learn more about functions later in this tutorial. In JavaScript programming, you can write your own procedures, called ____, which refer to a related group of JavaScript statements that are executed as a single unit. Statement Execution in JavaScript. So, typically speaking, the code you write will be “executed” by the JavaScript engine from top to bottom and left to right. JavaScript allows us to nest if statements within if statements.