SyntaxError: missing ] after element list

๋ฉ”์„ธ์ง€

SyntaxError: missing ] after element list

์—๋Ÿฌ ํƒ€์ž…

SyntaxError.

๋ฌด์—‡์ด ์ž˜๋ชป๋˜์—ˆ์„๊นŒ?

๋ฐฐ์—ด ์ดˆ๊ธฐ์ž ๊ตฌ๋ฌธ์— ์˜ค๋ฅ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ซ๋Š” ๋Œ€๊ด„ํ˜ธ("]") ๋˜๋Š” ์ฝค๋งˆ(",")๊ฐ€ ๋น ์ง„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

์˜ˆ์ œ

์™„์„ฑ๋˜์ง€ ์•Š์€ ๋ฐฐ์—ด ์ดˆ๊ธฐ์ž

var list = [1, 2,

var instruments = [
  'Ukulele',
  'Guitar',
  'Piano'
};

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

๋ฐ”๋ฅด๊ฒŒ ๊ณ ์น˜๋ฉด:

var list = [1, 2];

var instruments = [
 'Ukulele',
 'Guitar',
 'Piano'
];

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

๊ฐ™์ด ๋ณด๊ธฐ