I keeps on saying "Looks like your code didn't log the third element of the languages array. Remember that array indexes start from 0."


i don't understand what it means could someone please help

i don't have the code cause when i tried to cut and paste i press v instead of c


Hello @sideburn407,

Without link no one can know about your current exercise.
If you provide the link then someone would know what lesson you're on and they may help!:slight_smile:


ok here it is https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/0/2?curriculum_id=506324b3a7dffd00020bf661


The Array given there is..

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

Now it says to print third element from this.
For reminder: We've learnt that we can access the items of an Array using index.
These index starts from 0 unlike 1.
So the first element is 0th-element.
So the second element is 1st-element.
and so on..

for Ex..
There is an array called x

x = [1,'Flower',true]

1 ---- is at 0th index
'Flower' ---- is at 1st index
true ---- is at 2nd index

Now to access 2nd element , we do this..


In exercise we have asked to print the 3rd element of languages Array


finally i got it thanks :slight_smile: :smile: :wink:


I suggest revising few old things/concepts!
Its natural that old things slips out from mind, to avoid it,we can revise. :thumbsup:


--------------------------------This Works for Multidimensional arrays---------

newArray = [
[2 , [2, "xyz", true ], true],
[ 1, "zxv" ],
{ name: 'karnav' }


ok sure :slight_smile:


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