Hướng dẫn thử thách
1 / 1
Build a JavaScript Trivia Bot
**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
**User Stories:**
1. You should log `"Hello! I'm your coding fun fact guide!"` to the console as a greeting message to the user.
1. You should create three variables: `botName`, `botLocation`, and `favoriteLanguage`, that store the bot's name, where it's from, and its favorite programming language, respectively.
1. You should log `"My name is (botName) and I live on (botLocation)."` to the console.
1. You should log `"My favorite programming language is (favoriteLanguage)."` to the console.
1. You should use `let` to create a `codingFact` variable and assign it a string that is a fun fact about the bot's favorite programming language, using the `favoriteLanguage` variable.
1. You should log the `codingFact` to the console.
1. You should reassign the `codingFact` variable to a new fact about the bot's favorite programming language using the `favoriteLanguage` variable again.
1. You should log the `codingFact` to the console again.
1. You should reassign the `codingFact` variable to a third fact about the bot's favorite programming language using the `favoriteLanguage` variable again.
1. You should log the `codingFact` to the console a third time.
1. You should log `"It was fun sharing these facts with you. Goodbye! - (botName) from (botLocation)."` to the console as a farewell statement from the bot.
# --before-each--
```js
const spy = __helpers.spyOn(console, 'log');
const getLogs = () => spy.calls.map(call => call?.[0]);
```
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.js
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵