using or in if statements javascript code example
Example 1: if statement javascript
const randomObject = 5;
if(randomObject < 2) {
console.log("The Random Object has a value more than 2");
}
else {
console.log("The Random Object has a value less than 2");
}
Example 2: if condition javascript
if (condition){
// if true then execute this -}
else{
// if statment is not true then execut this -
}