JavaScript ecma6 Challenge help | Sololearn: Learn to code for FREE!

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}`); }

5/10/2021 10:43:46 PM

Sean

1 Answer

New Answer

+2

In main you are logging the return value of countryCard, which is undefined