添加属性到 对象
填空题 简单
题目
Fill in 空白到 添加属性 `email` 使用值 "[email protected]".
代码
const user = { name: "Ada" };
user___ = "[email protected]";
console.log(user.email);
提示
Use 点 notation 到添加新 属性.
解释
Using dot notation, 用户.email = "ada@示例.com" adds the email property to the user object. After this, user has two properties: name and email. The completed line is: 用户.email = "ada@示例.com";
相关资源
相关课程
- 对象
学习如何对象分组 related 数据使用键 and 值.
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。