Build a Greeting Bot - Step 15

Tell us what’s happening:

hello,apologies for the interruption,i just wanted to ask if my code in step 15 is correct? its like in step 1 when i click the “check my code” button,isn’t doing anything

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);
const favoriteSubject = "Computer Science";
const favoriteSubjectSentence = "My favorite subject is " + favoriteSubject + ".";
console.log(favoriteSubjectSentence);
console.log("Well, it was nice to talk to you, Have a nice day!");

// User Editable Region



// 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/144.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 15

hello! you should have this inside the User Editable Region

if you face issues, try to copy it then reset the step and paste it . Please try to keep changes limited to the User Editable Region for the tests to pass in the future.

Also, please make sure you have proper punctuation in the string to be logged.

1 Like

it is not strictly necessary to write inside the editable region, it’s there as a guide on where to write, but the tests do not consider the editable region itself

For the final step, you will log the bot’s message of "Well, it was nice to talk to you. Have a nice day!" to the console.

compare with the string you used

there is one small difference that you need to fix

1 Like

Live and learn! I did not know that. Thank you for sharing that information.

1 Like

note that there is not a step in which you need to write outside the editable region

but the tests do not care about it, it’s a visual indication of where to make changes

2 Likes