JavaScript 006 – If and if…else conditions

Just like other programming language, JavaScript (Scripting language) also provides decision-making structures using the if and else construct. The if statement comes with the condition which will evaluate to true or false. Now, have a look at the below code: