Build a Greeting Bot - Step 7

Tell us what’s happening:

Step 7
Earlier, you created the bot and botLocation variables. Now, you will use them to output new messages to the console.

In previous lessons, you learned how to work with string concatenation using the + operator to concatenate strings together like this:

Example Code
let firstName = “John”;

console.log("Hello, my name is " + firstName + “.”);
// result: “Hello, my name is John.”
Remember that you need to be mindful

Your code so far


// User Editable Region

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

// User Editable Region

Your browser information:

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

Challenge Information:

Build a Greeting Bot - Step 7

expected:

  • build a string using bot variable (from previous steps)
  • assign that string to the botIntroduction variable
  • log botIntroduction

what you did:

  • assign “Paul” to botIntroduction variable
  • log the string with botIntroduction variable

very different. next time, pay more attention to the instructions and do exactly what’s asked instead of copying the example code snippet. they never show you the solution outright.

I would suggest you reset the step so you recover the code you accidentally deleted

1 Like