country card coding problem in javascript for template literals | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

country card coding problem in javascript for template literals

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 let msg = `Name: ${country}, Capital: ${capital}`; console.log(msg);

12th Sep 2023, 8:06 AM
Vineela P
Vineela P - avatar
2 Answers
+ 3
You have 2x console log. That means your program is trying to output something twice. Is that correct? (Think about how to have the function countryCard return the information to output)
12th Sep 2023, 8:24 AM
Ausgrindtube
Ausgrindtube - avatar
0
Hy..
13th Sep 2023, 8:02 PM
Eslavath Surendar
Eslavath Surendar - avatar