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 trialHunter G
6,612 PointsWhy are all of my variable values being printed as "undefined" ?!
see snapshot below. EVERY single value is being printed as undefined..
Student: undefined Track: undefined Points: undefined Achievements: undefined
for ALL students. I thought I followed Dave's code correctly but maybe theres an error somebody can catch?
1 Answer
Max Karacsony
23,928 PointsTake a careful look at your students.js file where you define the keys of each student object. Keys are case sensitive. Take a look at this short example.
var myObject = {
foo: "bar"
}
console.log(myObject.Foo) // prints undefined
console.log(myObject.foo) // prints "bar"
MODERATOR Edited: Move from Comment section to Answer section so it may be up-voted / marked as Best Answer
Hunter G
6,612 PointsHunter G
6,612 Pointsyou are awesome, good eye!