SyntaxError: missing ] after element list
There is an error with the array initializer syntax somewhere. Likely there is a closing bracket ("]
") or a comma (",
") missing.
var list = [1, 2, var instruments = [ 'Ukulele', 'Guitar', 'Piano' }; var data = [{foo: 'bar'} {bar: 'foo'}];
Correct would be:
var list = [1, 2]; var instruments = [ 'Ukulele', 'Guitar', 'Piano' ]; var data = [{foo: 'bar'}, {bar: 'foo'}];
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Missing_bracket_after_list