Our volunteers haven't translated this article into ไทย yet. Join us and help get the job done!
You can also read the article in English (US).


SyntaxError: missing ] after element list

Error type


What went wrong?

There is an error with the array initializer syntax somewhere. Likely there is a closing bracket ("]") or a comma (",") missing.


Incomplete array initializer

var list = [1, 2,

var instruments = [

var data = [{foo: 'bar'} {bar: 'foo'}];

Correct would be:

var list = [1, 2];

var instruments = [

var data = [{foo: 'bar'}, {bar: 'foo'}];

See also

Document Tags and Contributors

ผู้มีส่วนร่วมกับหน้านี้: mdnwebdocs-bot, nmve, fscholz
อัปเดตล่าสุดโดย: mdnwebdocs-bot,