Search Header Logo
JavaScript Variables assessment mad libs

JavaScript Variables assessment mad libs

Assessment

Presentation

•

Other

•

University

•

Hard

Created by

Lioubov Rogalskaia

FREE Resource

4 Slides • 0 Questions

1

JavaScript Variables assessment

​Mad Libs

by Lioubov Rogalskaia

2

​Activity: Create Mad Libs Page (1-2days)(Teams of 2)
  1. You will be woking in groups of 2​

  2. Create a web page using HTML, JavaScript and SCC

  3. ​Web page should work as online madlibs

3

Little History

​Mad Libs is a phrasal template word game created by Leonard Stern and Roger Price. It consists of one player prompting others for a list of words to substitute for blanks in a story before reading aloud. The game is frequently played as a party game or as a pastime.

The game was invented in the United States, and more than 110 million copies of Mad Libs books have been sold since the series was first published in 1958.

4

​Instructions
  • ​Create a new page. In separate prompt boxes, prompt the user to supply his or her name and then 5 or more words. Save each item in a separate variable.

  • Then, using window.document.write() statements, use the information stored in variables to display a "mad libs" type of story, i.e. create a few paragraphs of information in story format. To help the user, you may want to provide descriptions of the types of words that you are looking for in each prompt box.

  •  Feel free to use one of these text samples from internet or one of your own.

  •  Modify your "mad libs" script so that it also prompts the user for a color and stores this color in a variable. Then, in the "mad libs" story, highlight each of the nouns, verbs, and adjectives collected from the user by setting their font color to this color and placing them in bold face type.

pattern-tertiary
JavaScript Variables assessment

​Mad Libs

by Lioubov Rogalskaia

Show answer

Auto Play

Slide 1 / 4

SLIDE