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 trialOmar Patel
23,055 PointsCan someone tell me what I'm typing wrong?
function printMessage (username, badgeCount, points){ var message = '${username} has ${badgeCount} total badge(s) and ${points} points in JavaScript'; console.log(message); }
printMessage("b", 100, 300);
this gives me:
var message = '${username} has ${badgeCount} total badge(s) and ${points} points in JavaScript'; console.log(message); } ā printMessage("b", 100, 300); ${username} has ${badgeCount} total badge(s) and ${points} points in JavaScript
2 Answers
KRIS NIKOLAISEN
54,971 PointsYou are using single quotes instead of backticks (to the left of the 1 key on the keyboard) to enclose your message . It should be:
var message = `${username} has ${badgeCount} total badge(s) and ${points} points in JavaScript`
Sara R
1,348 PointsThank you! BTW, it's on the left of the Z on my keyboard (in case anyone else is having trouble finding it).