我是 Javascript 的初学者,我有以下代码:
let address = {
street: 'Brighton',
city: 'NY',
zipcode: 121212,
showAddress() {
console.log(street + ' ' + city + ' ' + zipcode);// here is the issue I cannot understand why
}
}
let address1 = address.showAddress();
上面的代码显示一个错误
未捕获的 ReferenceError:街道未在 Object.showAddress 中定义
相关分类