Build a Greeting Bot - Step 15

Tell us what’s happening:

IDK what’s wrong here, It asked me to log this message to the console, which I did, and it says I still need to log it.

Your code so far

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

let bot;
let botLocation;

bot = "teacherBot";
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);

const favoriteSubject = "Computer Science";

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


// User Editable Region

const goodbye = "Well, it was nice to talk to you. have a nice day!";
console.log(goodbye);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 15

You have a slight error in the message.

Always remember to look closely, because the tests for these types of things are very often case sensitive, and will always fail if you get even just a single character wrong.

1 Like

I updated “Have” to be capitalized, and it still wont pass.

this is my updated code.

const botMessage = "Well, it was nice to talk to you. Have a nice day!";
console.log(botMessage);

After checking some stuff, turns out that the step actually expects you to directly log the message to the console, without the variable.

I do wonder how you thought of using the variable?

1 Like

I haven’t done that before, it has had me using variables to concatenate strings.

yes you have, check the first two lines of the code

it seems you have goodbye in the () but it should be like this:
code removed by moderator

hi @lulugambino

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.