Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

I don’t understand why is this not being approved.

Your code so far

// Greet the user
console.log("Hello! I'm your coding fun fact guide!")

// Create the variables
let botName = "CodeBot"
let botLocation = "Cloud"
let favoriteLanguage = "JavaScript"

// Log the bot's introduction
console.log("My name is " + botName + " and I live on " + botLocation + ".")
console.log("My favorite programming language is " + favoriteLanguage + ".")

// Create a fun fact variable
let codingFact = "Did you know that " + favoriteLanguage + " is one of the most popular languages in the world?"

// Log the first fact
console.log(codingFact)

// Reassign and log a new fact
codingFact = favoriteLanguage + " was created in 1995 and has become essential for web development."

console.log(codingFact)

// Reassign and log a third fact
codingFact = favoriteLanguage + " has a huge community and lots of open-source libraries available."

console.log(codingFact)

// Farewell message
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

There’s a bug in this lab (it will be fixed soon), you cannot start the string with a variable. Try to start concatenating with another string before favoriteLanguage.

1 Like