Please clear it where is the mistake , i write correct or wrong but this app not clear it right? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please clear it where is the mistake , i write correct or wrong but this app not clear it right?

let country = readLine(); let capital = readLine(); //complete the code console.log(`Country: ${Spain}, Capital:${Madrid} `);

11th Dec 2022, 10:52 AM
Imran Sarfraz
Imran Sarfraz - avatar
3 Answers
+ 3
In template literals we use ${variableName} to place value of variable in string, so do you have variable Spain or Madrid?
11th Dec 2022, 10:54 AM
PanicS
PanicS - avatar
+ 2
I just checked task you need to do, your goal is to do next: Input: Spain Madrid Output "Name: Spain, Capital: Madrid" So you dont have word Country you have Name. Also you have already boilerplate code, function where you need to return sentence using template literals, so next code will solve it, place it inside function what is already written for you return `Name: ${country}, Capital: ${capital}`;
11th Dec 2022, 12:58 PM
PanicS
PanicS - avatar
0
Yes there i have put variables but this app not going next level 🤔
11th Dec 2022, 11:00 AM
Imran Sarfraz
Imran Sarfraz - avatar