📜  javascript代码示例中的破坏

📅  最后修改于: 2022-03-11 15:01:38.260000             🧑  作者: Mango

代码示例3
Object Destructuring =>
//
   The destructuring assignment syntax is a JavaScript expression that makes it
possible to unpack values from arrays,
or properties from objects, into distinct variables.
//
example:
const user = {
    id: 42,
    is_verified: true
};

const {id, is_verified} = user;

console.log(id); // 42
console.log(is_verified); // true