Build a Greeting Bot - Step 7

Tell us what’s happening:

let bot = “teacherBot”
let botIntroduction = "My name is " + bot + ". "
console.log(botIntroduction)
Where is my mistake ?
Remember that you need to be mindful of spaces when concatenating strings with variables.
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;
let botLocation;

bot = "teacherBot";
botLocation = "the universe";

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


// User Editable Region

let bot = "teacherBot"
let botIntroduction = "My name is " + bot + "."
console.log(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/137.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 7

Hi @trantaianh10 and welcome to our community!

You shouldn’t be trying to redeclare the variable bot, as it was already declared (and then a value assigned) earlier in your code. Otherwise, your code is fine.