codecamp

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
JavaScript 对象操作
JavaScript 使用[]读取对象属性
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定