Shopping List the code below is not working what am I missing

Shopping List the code below is not working what am I missing
0.0 0

#1

Tell us what’s happening:

Your code so far

var myList = array
  (
      array("Chocolate Bar", 15),
     array("Chocolate Bar", 15),
     array("Chocolate Bar", 15),
     array("Chocolate Bar", 15),
     array("Chocolate Bar", 15)
  );

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36.

Link to the challenge:


#2

var myList =
[
[“Chocolate Bar”, 15],
[“Chocolate Bar”, 15],
[“Chocolate Bar”, 15],
[“Chocolate Bar”, 15],
[“Chocolate Bar”, 15]
];

this works fine


#3

You’ve found the answer it seems, and you want to use the array literal syntax ([]) rather than the constructor syntax, but for the sake of learning I’d like to point out that you can use the constructor. Make sure that you 1) use proper CapiTALizatION and 2) use the new keyword. This will also pass the test:


var myList = [
  new Array("Chocolate Bar", 15),
  new Array("Chocolate Bar", 15),
  new Array("Chocolate Bar", 15),
  new Array("Chocolate Bar", 15),
  new Array("Chocolate Bar", 15)
];