简体   繁体   English

Javascript 错误:在解构声明中缺少 =

[英]Javascript Error: missing = in destructuring declaration

I am getting a javascript error我收到一个 javascript 错误

"missing = in destructuring declaration" “缺少 = 在解构声明中”

What could be the problem?可能是什么问题呢?

This is not a standard javascript error.这不是标准的 javascript 错误。 It's coming from your editor.它来自你的编辑器。 You must be using the js2-mode (Javascript mode) for your Emacs editor.您的 Emacs 编辑器必须使用js2-mode (Javascript 模式)。 This could be a missing equals in for loop.这可能是 for 循环中缺少的 equals。 Example:例子:

for(i 0; i < arr.length;i++); /* missing = in destructuring declaration */

However, without looking at your code, we can only guess.然而,不看你的代码,我们只能猜测。

I got that error with a bad assignation (Python style) : var x,y = 2,3 ;我得到了错误分配(Python 样式)的错误: var x,y = 2,3 ; instead of : var x = 2, y = 3;而不是:var x = 2, y = 3;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM