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 trialJacob Shumer
2,982 PointsCode Challenge Help - Arrays
When i try to submit my code to get graded, it comes back with "Bummer: Did you index into the third item of 'finalLapTimes'?" Can anyone help? I have rewatched the video many times and can't get it to work. Thank You.
double[] lapTimes = new double[4];
lapTimes[0] = 2.2;
double[] finalLapTimes = new double[4]{ 2.2, 2.3, 2.5, 2.8 };
double lap3 = 2.5;
finalLapTimes[2] = lap3;
2 Answers
Mark Sebeck
Treehouse Moderator 37,799 PointsYou are super close. You just need to set lap3 = finalLapTimes[2]. You just have it backwards.
Jacob Shumer
2,982 PointsI thought it wanted the array to change not the lap3 variable. Thank You.