Tell us what’s happening:
Hi
Why have I got var myArray = [1]? And when I print it with console.log it returns 1 as well which I thought would have returned the second value 60?
Your code so far
// Setup
var myArray = [50,60,70];
// Only change code below this line
var myArray =[1]
var myData = myArray[0]
console.log(myArray)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56
.
Challenge: Access Array Data with Indexes
Link to the challenge: