curriculum/challenges/english/blocks/workshop-teacher-chatbot/66b6e62423e8a031d6c1f03d.md
Now it is time to get the length of the topic string.
You can use template literals inside console statements like this:
const developer = "Jessica";
console.log(`Hello, my name is ${developer}.`);
Start by outputting the message Here is an example of using the length property on the word [topic]. to the console.
Remember to replace [topic] with the topic variable, and use proper template literal syntax as you did in the previous steps.
Then, add a second console.log statement that outputs the length of the topic string to the console.
You should use template literal syntax to output the message Here is an example of using the length property on the word [topic]. to the console.
assert.match(code, /console\.log\(`Here\s+is\s+an\s+example\s+of\s+using\s+the\s+length\s+property\s+on\s+the\s+word\s+\$\{topic\}\.`\)/);
You should have a second console statement to output the length of the topic variable to the console.
assert.match(code, /console\.log\(\s*topic\.length\s*\)/);
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);
const strLengthIntro = `Here is an example of using the length property on the word ${subject}.`;
console.log(strLengthIntro);
console.log(subject.length);
--fcc-editable-region--
--fcc-editable-region--