📜  javascript 如何做 else if - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:30.987000             🧑  作者: Mango

代码示例1
if (condition1) {
  //  block of code to be executed if condition1 is true
} else if (condition2) {
  //  block of code to be executed if the condition1 is false and condition2 is true
} else {
  //  block of code to be executed if the condition1 is false and condition2 is false
}