Basic JavaScript - Shopping List

Tell us what’s happening:
Supposed to make a list containing 5 items, I have a feeling the semicolons are not supposed to be after each item in the list, but it also did not pass without the semicolons. Have no clue what I am missing. I can’t seem to get a hang of JavaScript. HTML was so easy.

Your code so far

const myList = [["cake", 5];
               ["pie", 4];
               ["pizza", 3];
               ["soda", 2];
               ["ice", 1]];

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Basic JavaScript - Shopping List

Link to the challenge:

The semicolons are definitely not correct.

What did you code look like “without the semicolons”? You need something between the sub-arrays, but you aren’t looking for a semicolon.

need a different punctuation mark other than semi-colon

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.