# Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

**URL:** <https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [April 16, 2026, 10:26am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006 "2026-04-16T10:26:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koladewhalez](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Koladewhalez](https://forum.freecodecamp.org/u/Koladewhalez)\
**Post date:** [April 16, 2026, 10:26am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/1 "2026-04-16T10:26:55Z")

</div>

### Tell us what’s happening:

console.log(“Hello! I’m your coding fun fact guide!”);

let botName = “Kolade”;  
console.log(botName);

let botLocation = “Nigeria”;  
console.log(botLocation);

let favoriteLanguage = “javascript”;  
console.log(favoriteLanguage);

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

Is there anything wrong with the code above? Despite it being correct and displaying the exact result expected in the result bar, it’s still displaying the error checks.

### Your code so far

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

let botName = "Kolade";
console.log(botName);

let botLocation = "Nigeria";
console.log(botLocation);

let favoriteLanguage = "javascript";
console.log(favoriteLanguage);

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

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

let codingFact = "I love to work on " + favoriteLanguage + ".";
console.log(codingFact);

codingFact = "Coding with " + favoriteLanguage + " is fun.";
console.log(codingFact);

codingFact = "I am learning " + favoriteLanguage + " fast.";
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/147.0.0.0 Safari/537.36`

### Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-v9/lab-javascript-trivia-bot/lab-javascript-trivia-bot)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![a1legalfreelance](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/a1legalfreelance/32/385700_2.png) [@a1legalfreelance](https://forum.freecodecamp.org/u/a1legalfreelance)\
**Post date:** [April 16, 2026, 10:29am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/2 "2026-04-16T10:29:05Z")

</div>

Please explain what the issue is? What error message(s) are you getting?

---

<div class="post-metadata">

**Author:** ![Koladewhalez](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Koladewhalez](https://forum.freecodecamp.org/u/Koladewhalez)\
**Post date:** [April 16, 2026, 11:07am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/3 "2026-04-16T11:07:41Z")

</div>

These are the error messages. I corrected it many times but these keep popping up. I feel like if there is any error detected, i should be corrected so i can move on with the class. I feel stuck right now. Thank you for your attention.

```auto
8. You should log to the console "My name is (botName) and I live on (botLocation)." and add the variables to the string.
9. You should log to the console "My favorite programming language is (favoriteLanguage)." and add the variable to the string.
13. You should assign a new value to codingFact that also contains favoriteLanguage, and log it to the console.
14. You should assign a value to codingFact for the third time that also contains favoriteLanguage, and log it to the console.
15. You should log to the console "It was fun sharing these facts with you. Goodbye! - (botName) from (botLocation)." and add the values of the variables.

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [April 16, 2026, 12:33pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/4 "2026-04-16T12:33:12Z")

</div>

please review the user stories, make sure that you have only the `console.log` statements that you are asked to use

---

<div class="post-metadata">

**Author:** ![Koladewhalez](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Koladewhalez](https://forum.freecodecamp.org/u/Koladewhalez)\
**Post date:** [April 16, 2026, 2:01pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/5 "2026-04-16T14:01:40Z")

</div>

Thats exactly all i did. Kindly see the screenshot attached.

 ![Screenshot 2026-04-16 145818](https://global.discourse-cdn.com/freecodecamp/original/4X/e/7/e/e7e16ea760bd441bdd56e40bba45033e11ac9e5b.png)

---

<div class="post-metadata">

**Author:** ![Koladewhalez](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Koladewhalez](https://forum.freecodecamp.org/u/Koladewhalez)\
**Post date:** [April 16, 2026, 2:02pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/6 "2026-04-16T14:02:59Z")

</div>

![Screenshot 2026-04-16 145906](https://global.discourse-cdn.com/freecodecamp/original/4X/a/a/c/aac8a0d5022f8f44aad106a89577fdaee79f6047.png)

---

<div class="post-metadata">

**Author:** ![a1legalfreelance](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/a1legalfreelance/32/385700_2.png) [@a1legalfreelance](https://forum.freecodecamp.org/u/a1legalfreelance)\
**Post date:** [April 16, 2026, 3:18pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/7 "2026-04-16T15:18:04Z")

</div>

> [@Koladewhalez](#):
>
> ```auto
> console.log("Hello! I'm your coding fun fact guide!");
> 
> let botName = "Kolade";
> console.log(botName);
> 
> let botLocation = "Nigeria";
> console.log(botLocation);
> 
> let favoriteLanguage = "javascript";
> console.log(favoriteLanguage);
> 
> console.log("My name is " + botName + " and I live on " + botLocation + "." ) ;
> 
> console.log("My favorite programming language is " + favoriteLanguage + ".");
> 
> let codingFact = "I love to work on " + favoriteLanguage + ".";
> console.log(codingFact);
> 
> codingFact = "Coding with " + favoriteLanguage + " is fun.";
> console.log(codingFact);
> 
> codingFact = "I am learning " + favoriteLanguage + " fast.";
> console.log(codingFact);
> 
> console.log("It was fun sharing these facts with you. Goodbye! - " + botName + " from " + botLocation + ".");
> 
> ```

Hi

You are not asked to just log the variable names to the console. You need to put the consoles exactly as asked.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [April 16, 2026, 5:21pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/8 "2026-04-16T17:21:55Z")

</div>

are you sure that’s exactly what you did?

these are the first 3 user stories, can you tell me which lines match each one?

> 1. You should log `"Hello! I'm your coding fun fact guide!"` to the console as a greeting message to the user.
> 2. You should create three variables: `botName`, `botLocation`, and `favoriteLanguage`, that store the bot’s name, where it’s from, and its favorite coding language, respectively.
> 3. You should log `"My name is (botName) and I live on (botLocation)."` to the console.

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [April 16, 2026, 7:10pm UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/9 "2026-04-16T19:10:58Z")

</div>

Welcome to the forum @Koladewhalez!

You were not asked to log `botName`, `botLocation`, and `favoriteLanguage`. Remove those logs and your code should pass.

Happy coding!

---

<div class="post-metadata">

**Author:** ![Koladewhalez](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@Koladewhalez](https://forum.freecodecamp.org/u/Koladewhalez)\
**Post date:** [April 17, 2026, 7:54am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/10 "2026-04-17T07:54:19Z")

</div>

Thank you for your assistance. I removed the logs and the code passed.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [May 15, 2026, 7:54am UTC](https://forum.freecodecamp.org/t/build-a-javascript-trivia-bot-build-a-javascript-trivia-bot/786006/11 "2026-05-15T07:54:42Z")

</div>

Closed on May 15, 2026, 7:54am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
