- 1
JavaScript practice 56
Why isnât this code correct? function main() { var country = readLine(); var capital = readLine(); console.log(countryCard(country, capital)); } function countryCard(country, capital){ //complete the function //use backtick (` `) for template literal const card = `Name: ${country}, Capital: ${capital}`; return card } My output is the same as the expected output but still I canât move on to my next exercise!
2 Answers
+ 3
Are you sure the output is the same?
The expected output is in a single line, but your string template seems to have a line break inside.
+ 2
Youâre right, fixed my problem