How do you print the fourth array?


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-NhsaT/2/2?curriculum_id=506324b3a7dffd00020bf661


Oops, try again. Alas, you should have printed 31, as that is the 4th element!


var junkData = ["Eddie Murphy", 49, "peanuts", 31];
console.log(junkData)


#2

You are now printing the whole array. You only want to print number four from the array junkData. You have to make it like this:

console.log(junkData[..])

In place of the dots you have to type a number. You want number four from the array. If you count 0 for number 1, which number do you have to fill in the place of the dots?

Good luck!


#3

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