JavaScript Node.js Basics Building a Command Line Application Making a GET Request with https

Omar Patel
Omar Patel
13,985 Points

Can 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

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
52,654 Points

You 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`