📜  如何在javascript代码示例中使用if else语句

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

代码示例1
var condition = true; // An example condition for true/false conditions

if (condition == true) {
    console.log('condition is true');  
} else {
    console.log('condition is not true');  
} // Console will output 'condition is true'