I'm trying to understand how to reference a value inside a 2D array.
My code is this:
var newArray = [[10, "city", true], [11, "continent", false], [12, "country", true]]; console.log(newArray[1,1]);
The output is:
[ 11, 'continent', false ]
If i have to print only the value "continent" from my array, how should i reference it?
should i use: newArray[1] ? I tried this too, but the output says 'undefined'.