Question

*********JUST NEED JAVASCRIPT CODE************** I want you to create a Mad Libs game using the information...

*********JUST NEED JAVASCRIPT CODE**************

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.

For the 6 pieces of information it can include anything from the users name, age, city they were born, etc... I just need the code to print all the info to the console when you inspect the element on the browser

Homework Answers

Answer #1

<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css">
<title>The Story Maker</title>
</head>
<body>
<div class="container">
<h1>The Story Maker</h1>
<script src="story.js"></script>
</div>
</body>
</html>

html,
body,
div,
h1,
h2,
p,
ul,
section {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}

html {
line-height: 1;
}

ul {
list-style: none;
}

section {
display: block;
}

body {
background: #edeff0;
padding: 50px 0 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 62.5%;
}

h1,
h2 {
font-size: 2.4em;
font-weight: 400;
margin-bottom: 8px;
color: #384047;
line-height: 1.2;
}

h2 {
font-size: 1.8em;
}

p {
color: #8d9aa5;
font-size: 1.4em;
margin-bottom: 15px;
line-height: 1.4;
}

.container {
box-sizing: border-box;
width: 90%;
max-width: 1080px;
background: white;
padding: 30px 15px;
margin: 0 auto;
position: relative;
overflow: hidden;
border-radius: 5px;
-webkit-box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
}

.button {
background: #3f8abf;
padding: 8px 18px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 1.4em;
color: white;
font-weight: 500;
border: 3px solid #3f8abf;
outline: none;
cursor: pointer;
display: -moz-inline-stack;
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
zoom: 1;
*display: inline;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 2px 0 0 #3574a0;
-moz-box-shadow: 0 2px 0 0 #3574a0;
box-shadow: 0 2px 0 0 #3574a0;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
}

.button:hover {
background: #397cac;
border-color: #397cac;
-webkit-box-shadow: 0 2px 0 0 #2c6085;
-moz-box-shadow: 0 2px 0 0 #2c6085;
box-shadow: 0 2px 0 0 #2c6085;
}

}

var questions = 3;
var questionsLeft = ' [' + questions + ' questions left]';
var adjective = prompt('Please type an adjective' + questionsLeft);
questions -= 1;
questionsLeft = ' [' + questions + ' questions left]';
var verb = prompt('Please type a verb that does not end in -ing ' + questionsLeft);
questions -= 1;
questionsLeft = ' [' + questions + ' questions left]';
var noun = prompt('Please type a noun' + questionsLeft);
alert('All done. Ready for the message?');
var sentence = "<h2>There once was a " + adjective;
sentence += ' programmer who wanted to use JavaScript to ' + verb;
sentence += ' the ' + noun + '.</h2>';
document.write(sentence);

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Use visual studio code to write the javascript programme. For this lab you must use a...
Use visual studio code to write the javascript programme. For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes. (a) Define a class for your item that meets the above three categorical and one numeric attribute requirements. (b) Create a text file that contains at least 5 such records in...
Use visual studio code to write the javascript programme. For this lab you must use a...
Use visual studio code to write the javascript programme. For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes. (a) Define a class for your item that meets the above three categorical and one numeric attribute requirements. (b) Create a text file that contains at least 5 such records in...
this time capture at least three numbers (a year, a month, and a date as a...
this time capture at least three numbers (a year, a month, and a date as a minimum) to make a date. You should prompt the user for a year and then a month and then a day. Use this data to create a date object. Make sure not to use the default debugging output of the date in the story. Use a date method such as toDateString to create a nice output. Make an object and use it to store...
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you...
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you will demonstrate how to create an HTML file, externally link a JavaScript file, and write some source code in the JavaScript file. a..Create two blank files to be an HTML file and a JavaScript file. The file names should be partA.html and partA.js. b.. Create a basic HTML webpage structure. c..Link the JavaScript file to the HTML file using the <script> tag. d.. Prompt...
Please linked both files. For this assignment you need to create a ToDo list using Javascript,...
Please linked both files. For this assignment you need to create a ToDo list using Javascript, along with HTML and CSS. Begin by creating a HTML page called todo.html. Then create a Javascript file called todo.js and link it in to the HTML page using a script tag. All Javascript for the assignment must be in the separate file. (For CSS, feel free to include styles in a style block at the top of the HTML page, or to link...
Need this done using PHP code and not javascript Create a PHP form with a textarea...
Need this done using PHP code and not javascript Create a PHP form with a textarea field input and a submit button. The textarea field should be able to accept up to 250 characters. When the user clicks the Submit button, read the text in the textarea and display the following results on a web age. At the bottom of the page include a link back to the form. Number of characters: Number of words: (hint: explode the string into...
PHP calculator problem Create a calculator class that will add, subtract, multiply, and divide two numbers....
PHP calculator problem Create a calculator class that will add, subtract, multiply, and divide two numbers. It will have a method that will accept three arguments consisting of a string and two numbers example ("+", 4, 5) where the string is the operator and the numbers are what will be used in the calculation. It doesn't need an HTML form, all the arguments are put in through the method. The class must check for a correct operator (+,*,-,/), and a...
--USING C# ONLY-- You will create your own on-line shopping store in the console application. You...
--USING C# ONLY-- You will create your own on-line shopping store in the console application. You can choose different products to sell in your store (at least 8 products). You will create an product inventory text file. The program will display two options at the beginning of the program, Customer and Manager. Customer: If this is a new customer, the program will allow the customer to register with their information and assign a unique ID number to the new customer....
Here is the code I am supposed to Analyze: // If we want to use the...
Here is the code I am supposed to Analyze: // If we want to use the Scanner class (type) to get user input, we need // to import the following Java package that includes the Scanner class // definitions. We do not have to add an import statement to use the // print() or println() methods of the System object, because they // are built in. import java.util.Scanner; public class PRG420Week1_AnalyzeAssignment { /* The main() method you see below is...
I need the actual code for this... I found a similar response but it was not...
I need the actual code for this... I found a similar response but it was not thorough enough. Problem Prerequisites: None Suppose that a scientist is doing some important research work that requires her to use rabbits in her experiments. She starts out with one adult male rabbit and one adult female rabbit. At the end of each month, a pair of adult rabbits produces one pair of offspring, a male and a female. These new offspring will take one...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT