varnyc={fullName:"NewYorkCity",mayor:"BilldeBlasio",population:8000000,boroughs:5};for(varpropertyinnyc){console.log(nyc.property);}//控制臺(tái)不應(yīng)該是屬性的值么?undefinedundefinedundefinedundefined
為什么for in循環(huán)里訪問對(duì)象的屬性是undifined?
慕村225694
2019-05-25 15:35:45