【问题标题】:I want to know the const declaration type of js [duplicate]我想知道js的const声明类型[重复]
【发布时间】:2019-11-24 18:08:33
【问题描述】:

我知道如何声明 const 变量,例如 const a = 1;

但我不明白这是什么

const { app, BrowserWindow } = require('electron')

谁能解释一下?

【问题讨论】:

标签: javascript


【解决方案1】:

这是一个解构赋值。

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment

它使您可以创建数组或结构成员的快捷方式。

【讨论】:

    猜你喜欢
    • 2018-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-10
    • 2018-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多