Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

Why only 7th and 8th test case is passing ? I don’t think my code is that terrible :frowning:

Your code so far

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

let botName = "BotX"; 
let botLocation = "The Universe"; 
let favoriteLanguage = "JavaScript";

console.log("My name is " + botName + "and I live on " + botLocation);
console.log("My favorite programming language is " + favoriteLanguage);

let codingFact = "The bot's favorite language is " + favoriteLanguage;
console.log(codingFact);

codingFact ="Bot's favorite langauge is " + favoriteLanguage;
console.log(codingFact);

codingFact ="Bot's favorite langauge is " + favoriteLanguage;
console.log(codingFact);

codingFact ="Bot's favorite langauge is " + 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

here you have a syntax error that is making the tests not work, do you see it?

1 Like

Once you’ve fixed that syntax error, you also need to be mindful of punctuation. Many sentences will need a full stop (period) adding at the end. It’s better to concatenate these directly onto the variable assignment, rather than adding them after the fact.

EDIT: There are also a few spacing issues… check your console to see how the strings are displaying.

1 Like

code removed by moderator

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.