curriculum/challenges/english/blocks/workshop-teacher-chatbot/66b6f586767a1534f3097353.md
Now it is time to access the second letter of the subject variable.
Start by adding a console statement that outputs the message Here is an example of accessing the second letter in the word [subject]. Remember to replace [subject] with the actual value of the subject variable and use correct template literal syntax.
Then add another console statement that outputs the second letter of the subject variable using bracket notation and the correct index number.
Your console statement should output the message Here is an example of accessing the second letter in the word [subject].
assert.match(code, /console\.log\(`Here\s+is\s+an\s+example\s+of\s+accessing\s+the\s+second\s+letter\s+in\s+the\s+word\s+\$\{subject\}\.`\);?/);
You should have another console statement that outputs the second letter of the subject variable using bracket notation index 1.
assert.match(code, /console\.log\(subject\[1\]\);?/);
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);
console.log(`Here is an example of using the length property on the word ${topic}.`);
console.log(topic.length);
console.log(`Here is an example of accessing the first letter in the word ${subject}.`);
console.log(subject[0]);
--fcc-editable-region--
--fcc-editable-region--