+ 1
Template Literals
Template Literals You need to make country cards for a school project. The given program takes the country and its capital name as input. Task Complete the code to return a string in the format you are given in the sample output: my code : // test 1 var countryTest1 =("Spain"); var capitalTest1 = ("Madrid"); console.log(` Country: ${countryTest1}, Capital: ${capitalTest1}`); but it works with the first one only, how can I fix all tests from test 1 to test 5?
4 ответов
+ 7
There should be a part of the code which were meant to read input of country & capital name in original code. You should use it to read input rather than assigning values manually in the code.
P.S. Try to search the forum, it's part of the lesson, so presumably someone had already posted a question around it and got some suggestions about what to do.
+ 5
Pls some one help me this template literal practice
Even after I done the sollution it's not completed
let country = readLine();
let capital = readLine();
//complete the code
console.log(Country:${country},Capital:${capital});
+ 3
Can you send any pics please ?
0
Help me not working test case are wrong but I did correctly