Open
Conversation
…ing a sentence template. You will use variables to store different parts of the story and then output the stories to the console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Javascript Certification
This course teaches you core JavaScript programming concepts such as working with variables, functions, objects, arrays, and control flow. You'll also learn how to manipulate the DOM, handle events, and apply techniques like asynchronous programming, functional programming, and accessibility best practices.
To earn your JavaScript Certification:
Complete the five required projects to qualify for the certification exam.
Pass the JavaScript Certification exam.
Variables and Strings
Build a JavaScript Trivia Bot
Objective: Fulfill the user stories below and get all the tests to pass to complete the lab.
User Stories:
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 output the stories to the console.
Objective: Fulfill the user stories below and get all the tests to pass to complete the lab.
User Stories:
You should declare the following variables using let:
You should assign the above variables some string values of your choice.
You should declare a firstStory variable.
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].";
You should output your first story to the console using the message "First story: [firstStory]".
You should assign new values to your adjective, noun, verb, place, adjective2, and noun2 variables.
You should declare a secondStory variable.
Create another story using the same template and assign it to the secondStory variable.
You should output your second story to the console using the message "Second story: [secondStory]".