Day_13 #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
会用 对象.键 取值
会 JSON 字符串和对象的互相转换
能说出对象和 JSON 字符串的区别
let person = {
name: "张三",
age: 18,
hobbies: ["代码", "篮球"]
};
console.log(person.name);
console.log(person.hobbies[1]);
const ren = JSON.stringify(person);
console.log(ren);
const wu = JSON.parse(ren);
console.log(wu.age);
对象.键取值会用 对象.键 取值
会 JSON 字符串和对象的互相转换
能说出对象和 JSON 字符串的区别
都会了,在ai的辅助记忆下已会使用JSON.stringify与JSON.parse