Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!
Message
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.
Examples
Incomplete array initializer
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"}];