var contacts = [ { "firstName": "Akira", "lastName": "Laine", "number": "0543236543", "likes": ["Pizza", "Coding", "Brownie Points"] }, { "firstName": "Harry", "lastName": "Potter", "number": "0994372684", "likes": ["Hogwarts", "Magic", "Hagrid"] } ];function lookUp(p){ alert(contacts[0].p);}lookUp("number");上面的函數(shù)調(diào)用后,顯示的結(jié)果是 undefined ,為什么不是 "0543236543" ?
為什么調(diào)用函數(shù)后它的對象屬性值為undefined?
繁華開滿天機(jī)
2018-09-04 13:13:33