+ 3
I'm stuck in the Template literal in the Country cards projects 😩😩 anyone please to help me
let country = readLine(); let capital = readLine(); //complete the code console.log(`Country: , Capital: `);
17 odpowiedzi
+ 4
Emmaculate Moraa depending on which one they are asking for the template-literals are
console.log(`Country: ${country}`);
console.log(`Capital: ${capital}`);
+ 3
let country = readLine();
let capital = readLine();
//copy and paste the code
console.log(`Country: ${country}, Capital: ${capital} `);
+ 1
Please put the programming language in the tag when creating a new thread, so we know which language we are talking about.
Also write down the course name and module name is helpful.
If it is a practice or challenge, please write down the description, if available, also the input and expected output.
If I'm not mistaken, you need to output the value stored in the variables, but your code is outputting a string.
+ 1
Emmaculate Moraa do you remember reading about the dollar sign and the curl brackets inside the backticks ...
+ 1
Emmaculate Moraa so if I asked you to add the variables to the template-literal you would understand
console.log
(`Country:
${country}
Capital:
${capital}
`);
+ 1
Emmaculate Moraa no you do not hard-coded any answers ( variables )
+ 1
You don't do anything further Emmaculate Moraa just hit run.
if you see kodie the ai it can help you with the solution as well
let country = readLine();
let capital = readLine();
//complete the code
console.log(`Country: ${country}, Capital: ${capital}`);
+ 1
Emmaculate Moraa
Are you entering
readline() or readLine()
???
readLine(); is correct.
0
The question states that I use code format above to output the following Output Country: Portugal Capital:Libson
0
The course is Template literals
0
I believe the hint is given in the bottom of the description in case the students forgot what they learned.
0
Yeah I remember them
0
Am I supposed to enter any spring inside the readline brackets? Because the code says that there is a reference error
0
Yeah I understand those literals
The problem is that the code does not run I don't know what I'll include in the readline ()
0
It still says reference errors
0
The AI needs fee and am not able to pay
0
I believe the hint is given in the bottom of the description in case the students forgot what they learned.