Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

Please help me figure out what to put on this part of the trivia bot where I have to give the codingFact a value that includes favoriteLanguage.

Your code so far

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

const botName = "Jax";

const botLocation = "Nipomo";

const favoriteLanguage = "Javascript";

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

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

let codingFact;

let codingFact = favoriteLanguage;




Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Welcome to the forum @215685

There is a message in the console.

SyntaxError: unknown: Identifier 'codingFact' has already been declared. (15:4)

  13 | let codingFact;
  14 |
> 15 | let codingFact = favoriteLanguage;
     |     ^

You declared the codingFact variable in an earlier line.

Remove the second variable declaration, then in the first one, add a string which includes the favoriteLanguage variable.

Happy coding