SOMEBODY HELP MEE

Tell us what’s happening:

My code is accurate, but it says I should have a variable that I already have. It won’t let me pass or check my code.

Your code so far

console.log("Hi there!");
console.log("I am excited to talk to you.");
let bot;
bot = "teacherBot";

let botLocation = "the universe";

console.log("Allow me to introduce myself.");

const botIntroduction = "My name is " + bot + ".";
console.log(botIntroduction);

const botLocationSentence = "I live in " + botLocation + ".";
console.log(botLocationSentence);

bot = "professorBot";

const nicknameIntroduction = "My nickname is " + bot + ".";
console.log(nicknameIntroduction);

bot = "awesomeTeacherBot";

const newNicknameGreeting = "I love my nickname but I wish people would call me " + bot + ".";
console.log(newNicknameGreeting);

favoriteSubject = "Computer Science";


// User Editable Region

let favoriteSubjectSentence  = "My favorite subject is " + favoriteSubject + "."; console.log(favoriteSubjectSentence);

// 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/136.0.0.0 Safari/537.36 Edg/136.0.0.0

Challenge Information:

Build a Greeting Bot - Step 14

Welcome to the forum @ODECOREE !

The new code you wrote looks correct, but you should see a reference error in the console because you changed a line of the starting code, removing const.
ReferenceError: favoriteSubject is not defined

Please click the reset button to restore the original code and try again.

image

Happy coding!

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