Tell us what’s happening:
The lesson states:
Example
const array = [50, 60, 70]; array[0]; const data = array[1];
array[0]
is now50
, anddata
has the value60
.
Why does it say array[0] is “now” 50? Wasn’t it 50 already by virtue of line 1? It wasn’t changed to 50 by the “array[0];” statement?
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Challenge: Access Array Data with Indexes
Link to the challenge: