请使用字面量创建一个学生对象自拟对象的属性和行为属性和行为每一种数量不少于3个在控制台输出对象
var student = { name: "Tom", age: 18, gender: "male", major: "Computer Science", grades: [90, 85, 95], attendClass: function() { console.log("The student is attending class."); }, study: function() { console.log("The student is studying."); }, submitAssignment: function() { console.log("The student is submitting an assignment."); } };
console.log(student);
原文地址: https://www.cveoy.top/t/topic/bWaL 著作权归作者所有。请勿转载和采集!