Build a Teacher Chatbot - Step 5

Tell us what’s happening:

why do they still keep my codee from passing… my sentence variable is created ,or is ther something i’m not getting right?. please help

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";


// User Editable Region

let sentence = `Today, you  will learn about ${strings} in ${JavaScript}.`;
console.log(sentence);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36

Challenge Information:

Build a Teacher Chatbot - Step 5
https://www.freecodecamp.org/learn/full-stack-developer/workshop-teacher-chatbot/step-5

Is this a variable you have declared?

no. The question asked to declare a “strings” variable previously which i got correct and then now asked to declare a sentence variable. please does that mean i’m to assign ${strings} to the sentece sentence variable? or u mean something else

This step says nothing about the a strings variable.

Today, you will learn about [topic variable goes here]

This is the instruction.

are you sure you created a strings variable? look at the rest of the code

i’ve followed all the instructions, i’ve even gone as faar as using AI for coding yet nothing i do is correct i’ve been at this for weeks pls can you explain in a way i’ll understand what i’m doing wrong? pleasee

You created a topic variable with a value of “strings.”

But here you are trying to reference the value of topic rather than the variable topic.

Also, please don’t rely on AI for your code. That is not allowed here.

i dont use AI i just did bcos i tried all i could think of . pls pardon me. And also, do you mean let sentence = Today, you will learn about {strings} in {JavaScript}.; or let = Today, you will learn about strings in JavaScript.; bcos none of them still passes.

ok thank you so much i’ve finally understood.

Congrats on hanging in there!

You may want to review this video/transcript on using template literals and string interpolation just to reinforce what you’ve grappled with here.

Keep at it…and good luck going forward.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.