标签:last def 访问 对象 nbsp person console bsp span
var person = { firstName: "Bill", lastName: "Gates", age: 50, eyeColor: "blue" } console.log(person.firstName) //Bill console.log(person[‘firstName‘]) //Bill console.log(person.name) //二者打印的的是一样的 console.log(person[‘name‘]) //没有的时候都undefined
标签:last def 访问 对象 nbsp person console bsp span
原文地址:https://www.cnblogs.com/shun1015/p/12233069.html