I'm not sure if any of you remember of have ever played Mad Libs
. It's a simple game. One person asks another to provide names, places, numbers, adjectives, and adverbs without knowing the context. Then those answers are filled in to make a story. It usually ends up being fairly silly.
I want you to create a Mad Libs game using the information from the lesson. There are a few requirements.
- The story must be printed out to the console.
- You must ask for a minimum of six (6) pieces of information.
- You must request at least three numbers add a number greater than one to each of them. What you decide to add is up to you but each value must be ADDED (not subtracted) to another number that is larger than one, and the results should be correct.
- Keep it safe for work. I'm going to have you post your work to the discussion forum and you'll have to play the games your classmates create so keep it professional or you won't get a passing grade.
- Submit both an HTML and JS file. I will start the program by opening the HTML file.
- After you are done, submit your work to the Canvas discussion board for this lesson.
- For extra credit use something from the Math class to perform a calculation to one of your numbers after you have done valid addition with it.
Note: This assignment has an extra credit component. To earn extra credit you must first earn a perfect score on the base requirements for the assignment.
Some general coding guidelines
- Throughout this class, prefer single vs double quotes around strings unless you have a good reason such as having single quotes in the string.
- Use camelCase style variable names rather than snake_case or kebob-case.
- Put a line break after every command.
- Comments are helpful. Don't be afraid to use them.
let myName = 'Bob';
// Capture the first letter of the name.
let firstInitial = myName;
let my_name = "Bob"; let first_initial = myName;