else if
- else if
- ===
"use strict";
var x = 23;
var y = 42;
if (x === y) {
console.log("equal");
} else if (x < y) {
console.log("x is smaller than y");
} else {
console.log("x is bigger than y");
}
// x is smaller than y
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
"use strict";
var x = 23;
var y = 42;
if (x === y) {
console.log("equal");
} else if (x < y) {
console.log("x is smaller than y");
} else {
console.log("x is bigger than y");
}
// x is smaller than y