Build a Greeting Bot - Step 7

Tell us what’s happening:

Build a Greeting Bot - Step 7: String concatenation not passing tests

Hi everyone,

I’m stuck on Step 7 of the “Build a Greeting Bot” workshop.

I have this code:

let botIntroduction = “Vitalie”;

console.log("My name is " + botIntroduction + “.”);

In the console, it outputs correctly: “My name is Vitalie.”

But the tests still fail with the message about using the + operator and being mindful of spaces.

I’ve tried different spacing and punctuation, but nothing works.

Can someone please tell me what I’m doing wrong?

Link to the challenge: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v9/workshop-greeting-bot/step-7

Thank you!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 = “Vitalie”;

console.log("My name is " + botIntroduction + “.”)

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 7

Hi

You need to assign the value given to the botIntroduction variable. Don’t change any of the text given in the instructions.

You then log the variable ‘botIntroduction’ to the console. I suggest you reset the step and try again.

Also it seems you used curly quote instead of quote or apostrophe ;

These often get converted to curly quotes when pasting code into the forum without using the preformatted text backticks.

1 Like