📅  最后修改于: 2022-03-11 15:03:12.443000             🧑  作者: Mango
let obj = {
name:"FreeCodeCamp"
review:"Awesome"
};
Object.freeze(obj);
obj.review = "bad"; //will be ignored. Mutation not allowed
obj.newProp = "Test"; // will be ignored. Mutation not allowed
console.log(obj);
// { name: "FreeCodeCamp", review:"Awesome"}