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 trialAditya Puri
1,080 PointsError
My code was working ok earlier but when I added this code I didn't get the same error as him..heres the code added and the diff. error. Please help
1 Answer
Seth Kroger
56,413 PointsFrom the little you've shown your treets
array is outside the scope of secondTreet
which you're trying to assign as the second element. secondTreet
doesn't exist at that point anymore.
Aditya Puri
1,080 PointsAditya Puri
1,080 Pointsnvm i accidentally put the code outside my main method :\