Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

The first time I ran the tests on this everything came back wrong. So then I reset and ran the tests as I went along.

Everything passed until I reached step 8. I continued anyway, ran the tests, and now virtually everything is marked as failing (even steps 1-7 which previously passed, and which I haven’t changed). I’m a little frustrated.

Your code so far

console.log("Hello! I'm your coding fun fact guide!");
let botName = "Harry";
let botLocation = "Revachol";
let favoriteLanguage = "JavaScript";

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

let codingFact = "I learnt " + favoriteLanguage "with Kim " + ".";
console.log(codingFact);

codingFact = "I used to talk to Measurehead about " + favoriteLanguage + "in the docks " + ".";
console.log(codingFact);

codingFact = "It's very difficult to learn " + favoriteLanguage + ".";

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Hi there,

I found a few issues in your code that you might want to correct:

  1. Missing + operators – your console.log statements are missing the + signs needed for string concatenation.
  2. Spacing issues – You’re missing spaces in several places within your console.log outputs. Make sure there are proper spaces around variables and punctuation.
  3. Missing - symbol – In the final console.log, you’re supposed to include a dash (-) Don’t forget it!
  4. Unnecessary + "" usage – If both parts are strings, you don’t need to concatenate with + ""; just combine them into one string.
  5. Missing final console.log – You need to include one more log statement for your final version of codingFact, as the lesson expects all three variations to be logged.

Fixing these should help you pass the remaining test. Keep going—you’re almost there!

1 Like