Shopping List help pls

Shopping List help pls
0.0 0

#1

Continuing the discussion from freeCodeCamp Challenge Guide: Shopping List:

That does not work even as: var myList = [[“Chocolate Bar”, 15], [“Biscuit”, 20], [“Cake”, 25], [“Sweet”, 30], [“Drink”, 35]];:confused:


#2

It is crazy!:rage: Gosh, I have no idea what to do!


#3

If you need help with a challenge, can you please share your solution so far and tell us what problems you’re running into with it? (What tests are failing? What error messages are you getting? What is working differently than you expect it to? etc)


#4

Ha ha, I know the answer now!

It is:

var myList = [
[‘Bread’, 56],
[‘Chips’, 97],
[‘Potatoes’, 123],
[‘Onions’, 78],
[‘Cheese’,508]
];


#5

This works fine… try it out
var myList = [
new Array(“Chocolate Bar”, 15),
new Array(“Milky Bar”, 11),
new Array(“Coffee Bar”, 12),
new Array(“Cococola”, 13),
new Array(“Pepsi”, 14)
];