Build a Teacher Chatbot - Step 6

Tell us what’s happening:

I don’t know what I did wrong. I put in ${subject} correctly.

Your code so far

console.log("Hi there!");

const botName = "teacherBot";

const greeting = `My name is ${botName}.`;
console.log(greeting);

const subject = "JavaScript";
const topic = "strings";

const sentence = `Today, you will learn about ${topic} in ${subject}.`;
console.log(sentence);


// User Editable Region

const strLengthIntro = 'Here is an example of using the length property on the word ${subject}.';
console.log(strLengthIntro);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0

Challenge Information:

Build a Teacher Chatbot - Step 6

Hi,
Welcome to the community!
You need to use template literals not single quotes to assign the value. look for this ` sign in your keyboard.
Good luck!

1 Like