0

JavaScript ecma6 Challenge help

I need to the code to return name: and capital: but I keep returning both and an undefined part. What am I missing? function main() { var country = readLine(); var capital = readLine(); console.log(countryCard(country, capital)); } function countryCard(country, capital){ console.log(`"Name: ${country}, Capital: ${capital}`); }

10th May 2021, 10:43 PM
Sean
Sean - avatar
1 Resposta
+ 2
In main you are logging the return value of countryCard, which is undefined
10th May 2021, 11:17 PM
Benjamin Jürgens
Benjamin Jürgens - avatar