Problem with "Build a Mathbot" Step 1

Hello there.

I’m trying to do the “Build a Mathbot” workshop right now and for some reason i can’t get past Step 1. As of now, my code looks like that:

const botName = "MathBot";
const greeting = "Hi there! My name is ${botName} and I am here to teach you about the Math object!";
console.log(greeting);

I get the following message when I try to submit it:

You should assign the following sentence to the greeting variable: "Hi there! My name is [MathBot goes here] and I am here to teach you about the Math object!". Make sure to replace [MathBot goes here] with the botName variable.

What am I missing here? Thank you for your help!

Edit: I managed to get it right with string concatenation and it changes the code to:

const botName = “MathBot”;

const greeting = `Hi there! My name is ${botName} and I am here to teach you about the Math object!`;

console.log(greeting);

Am I wrong to assume that template literals should work in double quotes? Thanks!

Yes

https://www.w3schools.com/js/js_string_templates.asp

Did you not see that your output was not printing the variable?

On no, I absolutely saw it. I just thought to remember to also do it with double quotes in the “String Inspector” workshop but apparently i remembered wrong. Thanks again for your help!

There’s basically no difference between single and double quotes. Except if you need to include quotes in your string you can alternate.

console.log('This will print "quotes" around that word')