我正在尝试通过在 objectProperty 的末尾添加一个变量以选择属性来 console.log out 一个 true/false 语句:(appleAmount.amount+number)?你怎么做呢?
let apple = 48;
let appleAmount = {
amount0 : 20,
amount1 : 40,
amount2 : 48
}
let number = 2;
console.log(apple === appleAmount.amount+number);