Shopping List Question

I don’t understand what I’m doing wrong here. I’ve tried to double, double-check this but I can’t find the problem.

PLEASE help. I’m so frustrated with this.

Your code so far


var myList = [["fruit", 2]["chips", 3]["chocolate", 7]["cookies", 5]["eggs", 6]];

Your browser information:

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

Challenge: Shopping List

Link to the challenge:

Hi @AuddreyMarx !

Welcome to the forum!

You are missing commas between each of the sub arrays. It might also help to structure like this to find errors better.

var myList = [
  ["fruit", 2],
  ["chips", 3],
//etc
]
1 Like

THANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOU! This fixed it. THANKYOU!

1 Like

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