提问人:RNdev 提问时间:12/4/2022 更新时间:12/4/2022 访问量:27
Javascript:为什么设置两个不可变变量相等可以通过“===”测试,而不可变变量则不能?[复制]
Javascript: Why does setting two immutable variables equal pass the '===' test, but immutable not? [duplicate]
问:
let a = "hello"
let b = "hello"
console.log(a === b)
返回 ,但true
let a = ["hello"]
let b = ["hello"]
console.log(a === b)
返回。为什么会这样?false
答: 暂无答案
评论