Having probs with doing the exercise in string interp II


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript-introduction/lessons/variables/exercises/string-interpolation-ii?action=lesson_resume&program_content_id=d65fdeb1b1d9d288d9130bf845eb5695&program_id=03b329471a3e6463699ebacbc60c3d47

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Did you interpolate your name and favorite city using ES6 string interpolation?

```

let myName=‘Frank’;
let myCity=‘Lawrence’;
//Use ${} to interpolate these variables into “My name is NAME. My city is CITY.” Use console.log() to print it to the console.
console.log(My name is ${myName}. My city is ${myCity}.)
//Output=“My name is Frank. My city is Lawrence.”

<do not remove the three backticks above>

#2

Hi @fjsully3,

You need to follow the instruction to print what is required:

Copied from Instruction 3:

Use ${} to interpolate your variables into the sentence below. Use console.log() to print your sentence to the console.

My name is NAME. My favorite city is CITY.

Your code syntax is correct, but you are missing out the word favorite. To pass, you need to print to the console exactly what the lesson requires.

Hope this clarifies. Cheers :slight_smile:


#3

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