- 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 Antworten
+ 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