1x = 10;
2if(x > 100 ) console.log('over 100')
3else if (x > 90 ) console.log('over 90')
4else if (x > 50 ) console.log('over 50')
5else if (x > 9 ) console.log('over 9')
6else console.log('lower 9')
7
1if (condition1) {
2 // code to be executed if condition1 is true
3} else if (condition2) {
4 // code to be executed if the condition1 is false and condition2 is true
5} else {
6 // code to be executed if the condition1 is false and condition2 is false
7}
1var age=20;
2if (age < 18) {
3 console.log("underage");
4} else {
5 console.log("let em in!");
6}
1let number = 10;
2if(number>=20){
3 alert("number >= 20");
4}else if(number === 10){
5 alert("number = 10");
6}
7// We Don't have "elif" but you can use "else if",It's same.
8//You can also use switch :)