Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

Hey there! Been at this for a while, trying a variety of strings to achieve test 14 and 15, no issues on any other test and everything appearing in the console as it should - is there a bug issue going on as I can’t really tell where I’m going wrong?

Note: I have four codingFact in my current code below, however I’m still not passing the tests if I only have three.

Your code so far

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

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

let codingFact = "JavaScript was created in 1995.";
console.log(codingFact);

codingFact = "Anoter interesting fact about " + favoriteLanguage + " is that it was made in just 10 days!";
console.log(codingFact);

codingFact = "Brendan Eich was the creator of " + favoriteLanguage + ", the world's most popular programming language.";
console.log(codingFact);

codingFact = "Here's one more " + favoriteLanguage + " fun fact: ";
console.log(codingFact);

console.log("It was fun sharing these fun 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/137.0.0.0 Safari/537.36

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

you currently have too many logs and assignments to consoleLog

The total number of logs should be 1 less than you have at the moment and the total number of assignments to the consoleLog should be 1 less as well.

let codingFact = "JavaScript was created in 1995.";
console.log(codingFact);

The first declaration should use favoriteLanguage.

Also the final message should only have the word ‘fun’ once. Yours has the word ‘fun’ twice.

Sample console output:

// console output
Hello! I'm your coding fun fact guide!
My name is robotNick and I live on Mars.
My favorite programming language is JavaScript.
Anoter interesting fact about JavaScript is that it was made in just 10 days!
Brendan Eich was the creator of JavaScript, the world's most popular programming language.
Here's one more JavaScript fun fact: 
It was fun sharing these facts with you. Goodbye! - robotNick from Mars.
1 Like

My goodness I must’ve been tired when I kept trying this, the prompts are very clear - thank you for your assistance! :saluting_face:

1 Like