if stamenet javascript code example
Example 1: if statements javascript
if (pros < 10) {
console.log("LESS THAN 10 PROS!");
}
else if (pros < 5) {
console.log("LESS THAN 5 PROS!");
}
else {
console.log("How many pros are there?");
}
Example 2: else if
if ( x > 10 )
{
cout << "x is greater than 10";
}
else
{
cout << "x is less than 10";
}