
JavaScript 使用点操作符.读取对象属性
// Setup
var testObj = {
"hat": "ballcap",
"shirt": "jersey",
"shoes": "cleats"
};
// Only change code below this line
var hatValue = testObj.hat;// Change this line
var shirtValue = testObj.shirt;// Change this line
// Setup
var testObj = {
"hat": "ballcap",
"shirt": "jersey",
"shoes": "cleats"
};
// Only change code below this line
var hatValue = testObj.hat;// Change this line
var shirtValue = testObj.shirt;// Change this line
关闭