curriculum/challenges/english/blocks/workshop-teacher-chatbot/66b6e39031393e30f2c48d0f.md
To get the length of a string, you can use the <dfn>length</dfn> property. This property returns the number of characters in a string.
Here is an example:
const greeting = "Hello, world!";
// Output: 13
console.log(greeting.length);
Start by using the length property to get the length of the subject string and log that value to the console.
You should use the length property to get the length of the subject string.
assert.match(code, /subject\.length/);
You should log the length of the subject string to the console.
assert.match(code, /console\.log\(\s*subject\.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);
--fcc-editable-region--
--fcc-editable-region--