Array inside an array



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]];

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[1]] ? I tried this too, but the output says 'undefined'.




Thanks Konaesan. This worked!


@gigarockstar76103 You're welcome :+1:


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