Pls help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Pls help

let country = readLine(); let capital = readLine(); console.log(`Country:${country},Capital:${capital}`); Code is from country card test and i checked solution it was all same but not working

29th Dec 2022, 12:55 PM
Harsh Rana
Harsh Rana - avatar
5 Answers
+ 1
It is from template literals the code coach thing at last
29th Dec 2022, 1:26 PM
Harsh Rana
Harsh Rana - avatar
+ 2
Can you add task number or link with course? I guess, there is a space required after country or after colon ':' ( between country, capital).. console.log( `Country: ${country}, Capital: ${capital}` );
29th Dec 2022, 1:25 PM
Jayakrishna 🇮🇳
+ 1
Output format except a space after values.. Check again closely..
29th Dec 2022, 1:19 PM
Jayakrishna 🇮🇳
+ 1
Can u elaborate
29th Dec 2022, 1:22 PM
Harsh Rana
Harsh Rana - avatar
+ 1
It should be next string as output: Name: Portugal, Capital: Lisbon But your string is: Country:Portugal, Capital:Lisbon Fix spacing and replace Country with Name I omitted readLine part, so you can understand difference better
29th Dec 2022, 2:07 PM
PanicS
PanicS - avatar