Build a Greeting Bot - Step 7

Tell us what’s happening:

Create a variable called botIntroduction.

Then use string concatenation with the + operator to join the string "My name is " followed by the bot variable followed by a period (.).

Assign this value to the botIntroduction variable.

Then, log the botIntroduction variable to the console.

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


// User Editable Region

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

// 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 7

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

"Hello, my name is " + firstName + "."

The code in the example is very similar to what you are being asked to do in this instruction. But in the example, the variable is firstName instead of bot.

After you assign to your botIntroduction variable, then you just need to log botIntroduction.

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