+ 1

How to solve code for all Country Cards instead of just one in Template Literals?

I figured out how to write the code for one country card (example - Country: USA Capital: Washington) and it'll say I solved Test 3 but I can't passed it yet because the other country cards haven't been solved yet. Thank you for your guys help in advance! Here is the written code I tried: let country = ("USA"); let capital = ("Washington"); //complete the code console.log(`Country: ${country}, Capital: ${capital} `);

24th Mar 2023, 2:38 PM
PCATechStudio
PCATechStudio - avatar
3 Antworten
+ 6
Do not remove the given code. We need to take input for country and capital.
24th Mar 2023, 3:01 PM
Lisa
Lisa - avatar
24th Mar 2023, 4:41 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 4
Your code has to be dynamic, cater for any cases that may come up, not one specific case.
24th Mar 2023, 3:41 PM
William Mabotja
William Mabotja - avatar