All Tracks/lab sentence maker/
Đang tải...
Hướng dẫn thử thách
1 / 1

Build a Sentence Maker

In this lab, you will create two different stories using a sentence template. You will use variables to store different parts of the story and then log the stories to the console. **Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab. **User Stories:** 1. You should declare the following variables using `let`: - `adjective` - `noun` - `verb` - `place` - `adjective2` - `noun2` 1. You should assign the above variables some string values of your choice. 1. You should declare a `firstStory` variable. 1. You should use the following story template to create the first story and assign it to the `firstStory` variable: `"Once upon a time, there was a(n) [adjective] [noun] who loved to eat [noun2]. The [noun] lived in a [place] and had [adjective2] nostrils that blew fire when it was [verb]."` 1. You should log your first story to the console using the message `"First story: [firstStory]"`. 1. You should assign new values to your `adjective`, `noun`, `verb`, `place`, `adjective2`, and `noun2` variables. 1. You should declare a `secondStory` variable. 1. You should create another story using the same template and assign it to the `secondStory` variable. 1. You should log your second story to the console using the message `"Second story: [secondStory]"`. # --before-each-- ```js const spy = __helpers.spyOn(console, 'log'); const getLogs = () => spy.calls.map(call => call.join(' ')); ```
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:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.