Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

I’m not sure what is wrong. I cannot pass 8 or 15.

  1. You should log to the console "My name is (botName) and I live on (botLocation)." using concatenation to add the variables to the string.

  2. You should log to the console "It was fun sharing these facts with you. Goodbye! - (botName) from (botLocation)." using concatenation to add the values of the variables.

What am I missing here?

Your code so far

let greetingMessage = "Hello! I'm your coding fun fact guide!";
console.log(greetingMessage);

let botName = "Reginald ";
let botLocation = "Alpha Centauri";
let favoriteLanguage = "JavaScript";

let nameLocationSentence = "My name is " + botName + "and I live on " + botLocation + ".";
console.log(nameLocationSentence);

let favoriteLanguageSentence = "My favorite programming language is " + favoriteLanguage + ".";
console.log(favoriteLanguageSentence);

let codingFact = "Monks invented " + favoriteLanguage + "!";
console.log(codingFact);

codingFact = "Dogs love " + favoriteLanguage + "!";
console.log(codingFact);

codingFact = "Chickens detest " + favoriteLanguage + "!";
console.log(codingFact);

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

Your browser information:

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

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Hi. You don’t need to create variables to store the sentences where you are not asked to do so. Just log what is said to the console, inserting the variables you were asked to create as appropriate. Also look carefully at your spacing in the text.

Thank you. I went back and removed the unnecessary text and it still wasn’t working for 8 and 15. I had a spacing issue in the string in 15 that solved that one, but the only way I could solve 8 was by changing the spacing between console.log and the parenthesis. It was odd because all the others work like this: console.log(), but 8 required me to do it like this: console.log () with a space before the parenthesis. Either way, it worked, but that doesn’t make sense to me why that would be the solution.