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
Corey Lyons
24,684 PointsQuiz question Ajax and API's
Assume you have the following JavaScript object:
'''JavaScript
var contact = { name : "Jill", phone: "510-555-1212" };
'''
Finish the code below to display the object's "name" property in an alert box:
alert();
I am stuck on this quiz question at the end of Stage 4 of Ajax and API's. Any help would be appreciated!
2 Answers
Tree Casiano
16,436 PointsYou need to use dot notation. This should do the trick:
alert(contact.name);
Corey Lyons
24,684 PointsThank you! I guess I was thinking about that one too hard.
Tree Casiano
16,436 PointsI know that feeling. :-) Glad I could help.