if statement syntax code example
Example 1: if statement
if( ID = josh ):
print("ID confirmed")
else:
print("ID does not exist")
Example 2: syntax of if stmt
if (condition)
{
}
Example 3: IF else statement
var age=20;
if (age < 18) {
console.log("underage");
} else {
console.log("let em in!");
}
Example 4: IF else statement
var age=20;
if (age < 18) {
console.log("underage");
} else {
console.log("let em in!");
}
Example 5: else if javascript
if (condition1) {
} else if (condition2) {
} else {
}
Example 6: IF STATEMENT WHAT IS IT
if (X < 10) {
print "Hello John";
}