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 trialTim Williams
Courses Plus Student 9,267 PointsConfirming the origin of arguments passed to printMessage
In "Capturing Command Line Arguments" for Node.js how do we know to use "profile". badges or "profile".points? Raw data shows "points" and "badges" but not "profile: points" or anything to let us know that points is a child of the parent named "profile"? I'm pretty sure I missed it in some obvious way but I looked and wasn't sure.
1 Answer
Steven Parker
231,269 PointsBoth "badges" and "points" are properties of the JSON object so the only parent they might have would be the one you assign the output of the parse to. So if your object is named "profile" then they would become "profile.bages" and "profile.points" respectively.
Tim Williams
Courses Plus Student 9,267 PointsTim Williams
Courses Plus Student 9,267 PointsTotally overlooked the declaration in my own code!!! I knew it was something foolish. Thank you!