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
Heather Cloward
6,506 PointsFor some reason ('(${url})') does not work for me. It prints (url) on the page not the actual href.
When I put $(this).parent().append('(${url})') in the jQuery code it does not print the actual url on the page it prints, "(url)". However when I put $(this).parent().append('(' + url + ')'), I am able to get the correct result. Why does it not work for me as it does for her in the tutorial?
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! It seems like you're confusing backticks with apostrophes/single quotes.
You say you wrote this:
$(this).parent().append('(${url})')
But the url part in the middle looks like it's in JavaScript Template Literal syntax which means that the surrounding "quotes" should actually be backticks and look like this:
$(this).parent().append(`(${url})`)
Try changing the ' to a ` and see if it works!
Heather Cloward
6,506 PointsHeather Cloward
6,506 PointsAhhh, you are right. Thanks for your help!