0
In this course of JavaScript, There is a task about Tamplate literals. I can't solve that despite seen the solution.
Tamplate literals: You need to make country code for a school project. The given program takes the country and its captial name as input. Task: complete the code to return a string in the format you are given in the sample output; Sample output: Country:portugal, Capital:lisbon let country = readLine(); let capital = readLine(); //complete the code(and the answer is) console.log(`Country:${country} , Capital:{capital} `); despite the given answer i couldn't make it though. Where is the problem ? Is that bug or sth, i am literally unable to find the problem ? Solve it please!
4 Respostas
+ 5
Look at console.log capital. You have to put a $ symbol before {capital}.
+ 4
You have a space after {country} variable, that is probably causing the problem
+ 1
Shownick Bhattacharjee
Can you share your code here so we may directly examine it, and solve it.
You are definately missing a $, and I suspect 2x " ", as already stated by Ugulberto Sánchez
0
Yeah.. I mistakenly missed it to put in here..But there is still have a problem..