if in if statement code example
Example 1: if statement
if( ID = josh ):
print("ID confirmed")
// python
else:
print("ID does not exist")
Example 2: javascript if else
var age=20;
if (age < 18) {
console.log("underage");
} else {
console.log("let em in!");
}
Example 3: else if javascript
if (condition1) {
// code to be executed if condition1 is true
} else if (condition2) {
// code to be executed if the condition1 is false and condition2 is true
} else {
// code to be executed if the condition1 is false and condition2 is false
}
Example 4: how does an if statement work
//simpple reapet code
draw = function() {
var d = 11
if(d > 10) {
ellipse(200,200,200,200);
}
}
//ellipse apiers