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 trialMUZ140884 Maxwell Makumucha
6,291 Pointsneed help on this short challenge guys, how will i finish the codes
1.var contact = { name : "Jill", phone: "510-555-1212" }; Finish the code below to display the object's "name" property in an alert box:
alert( )
2.Finish the code below to insert the contents of the variable "sidebarHTML" into an HTML element with the ID of "sidebar". Make sure you insert this content as HTML using jQuery.
$('#sidebar').____________ ;
4 Answers
Roy Penrod
19,810 PointsThe answer your'e looking for is:
$('#sidebar').html(sidebarHTML);
Note: I checked the answer in the quiz and it passed.
Tonye Jack
Full Stack JavaScript Techdegree Student 12,469 Pointscontact.name,
$('#sidebar').html(sidebarHTML);
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsI am going through this class a 2nd time and I typed the exact same answer and it came up incorrect. Hmmm...
Roy Penrod
19,810 PointsThat's weird, Juliette. I just tested it in the quiz again and it passed for me.
Roy
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsI jumped the gun Roy. I had two semi-colons. I had spent the previous few hours reading up on what's new in Javascript via several articles and I think that I began to get some serious brain fog:-)
Roy Penrod
19,810 PointsOh, I've been there before. Plenty of times. :-)