How do I display each of the elements in detail in the following array in the VS Code console using JavaScript?
var myList = [[“cereal”, 3], [“milk”, 2], [“bananas”, 3], [“juice”, 2], [“eggs”, 6]];
My attempt:
console.log(myList);
Console displayed:
(5) [Array(2), Array(2), Array(2), Array(2), Array(2)]
New contributor
Notus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.