Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Foundations Arrays Getting and Setting

Ahmed Helmi
Ahmed Helmi
6,032 Points

is it bugged

i should write myArray[32] = 'treehouse'; so it could set 'treehouse' as the 31st item in the array . but once i cleck on checkwork . it said it should be 33 instead of 31 . then if i write 33 . it said it should be 34 istead of 31

2 Answers

Array element indexes start at 0, so that means that the 31st element is at index 30.

Ahmed Helmi
Ahmed Helmi
6,032 Points

yes i got it . but sadly didnt know how to remove my request thank you . i really appreciate it