📜  Javascript 代码示例中的嵌套比较运算符

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

代码示例1
var myBudget = 100;
var foodCost = 80;
var isfoodDelicious = true;

if (myBudget > foodCost) {
    if (isfoodDelicious == true) {
        console.log("I can buy this food")
    }
} else {
    console.log("I buy this food later")
}

//output: I can buy this food