Build a Greeting Bot - Step 7

Tell us what’s happening:

i want solution of this i can use concatination
but cant understand the question where to usre bot variable and where to use botIntroduction
please help me

Your code so far


// User Editable Region

let firstN;


console.log("My name is " + firstName + ".");

// 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/138.0.0.0 Safari/537.36

Challenge Information:

Build a Greeting Bot - Step 7
https://www.freecodecamp.org/learn/full-stack-developer/workshop-greeting-bot/step-7

hello and welcome to fcc forum :slight_smile:

  • do you understand whats happening here?

if so then lets move on to rea from instructions

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

  • on editor now you need to follow along these steps and complete this exercise
  • hints, make use of already existing “bot” variable in string concatenation

you can ask away if you have questions, happy coding :slight_smile:

Please use this:

code removed by moderator

=======
You declared firstN but then tried to use firstName, which is undefined.

let firstN;
console.log("My name is " + firstName + “.”);

Hi @munjajikadam8262

You’re on the right track with using concatenation!

To make it work:

  1. You need to declare firstName and assign a value to it.
  2. Then use it in the botIntroduction variable.

Here’s how you can do it:

code removed by moderator

hi @chrizfasa

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Alright, thank you for pointing it out for me. I will follow the community guide line going forward.

1 Like

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