Build a JavaScript Trivia Bot - Error on the 8th instruction

Tell us what’s happening:

Error concatenating in the 8th instruction.
Code:
codingFact = ‘this is my first’ + favoriteLanguage;
console.log(codingFact);
What am I doing wrong?
All the 11 instructions of 12 is checked correctly but only this instrucion is not right, but my code looks ok…
I’ve already try to complete this trivia before but the error was on 11th instruction, i’ve remake the trivia and now the error is on the 8th instruction…

Your code so far

console.log("Hello! I'm your coding fun fact guide!");
let botName, botLocation, favoriteLanguage;
botName = "Fernando";
botLocation = "Brasil";
favoriteLanguage = "JavaScript";
console.log("My name is " +botName+ " and I live on " +botLocation+ ".");
console.log("My favorite programming language is "+favoriteLanguage+".");

let codingFact;

codingFact = "this is my first " + favoriteLanguage;
console.log(codingFact);

codingFact = "This is my second try on " +favoriteLanguage;
console.log(codingFact);

codingFact = "This is the third time trying on " + favoriteLanguage;
console.log(codingFact);

console.log("It was fun sharing these facts with you. Goodbye! - "+botName+" from "+botLocation+".")

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

I didn’t see the variable declaration like that with one let keyword more than one variable declared.

Spacing and punctuation meters in string concatenation.

1 Like

the tests expect the variable to be initialized at declaration

1 Like

That worked! I’m used to declare like C language and i’m not used to declare the variables all the time! Thanks

Thanks! I declare like you said and it work! I didn’t see the spaces betwen the variables, it took me a while to see this error haha

1 Like