Build a Greeting Bot - Step 7

Tell us what’s happening:

// Step 1: Declare and initialize the bot variable
let bot = “Bot”;

// Step 2: Declare the botIntroduction variable
let botIntroduction;

// Step 3: Assign the concatenated string (with proper spacing)
botIntroduction = "My name is " + bot + “.”;

// Step 4: Log the result
console.log(botIntroduction);
let botIntroduction;
botIntroduction = "My name is " + bot + “.”;
console.log(botIntroduction);
I have tried many times
let botIntroduction;
botIntroduction = "My name is " + bot + “.”;
console.

Your code so far


// User Editable Region

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 7

The bot variable was already declared and assigned earlier in your code, so you do not need to do anything with that here.

Otherwise your code appears to be correct.

Note that you can also declare and assign a variable in a single line if you wish:

let myVariable = “hello world”;

instead of:

let myVariable;

myVariable = “hello world”;