Basic JavaScript - Constructing Strings with Variables

Tell us what’s happening:
Describe your issue in detail here.
I m stuck here I just need the code to pass this one

Your code so far

var myName = "Bobby";
var myFavLetter = "B";
var sentence =
  "Hello, I'm " + myName + ". My favorite letter is " + myFavLetter + ".";
//The result is "Hello, I'm Bobby. My favorite letter is B.
var myName = "Bobby";
var myFavLetter = "B";
var sentence =
  "Hello, I'm " + myName + ". My favorite letter is " + myFavLetter + ".";
//The result is "Hello, I'm Bobby. My favorite letter is B.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Challenge: Basic JavaScript - Constructing Strings with Variables

Link to the challenge:

It looks like the directions say: Set myName to a string equal to your name and build myStr with myName between the strings My name is and and I am well!

Your test may be failing because you did not use the exact variables they wanted you to use in order to pass the test. Otherwise, what you have looks good! Just have to re-do it following the instructions.

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