An Abbreviated Introduction to JavaScript

[Overview] [Basics] [More] [Fun] [Class 2] [If] [Functions] [Timing] [Queries] [References] [Examples] [Libraries] [Assignments]


Moderate Introductory Assignment: The Name Game

Purpose: The goal of this assignment is to get you accustomed to working with JavaScript in your pages and to help you explore Java's string operations.

Assignment: The Name Game

In this assignment, you will attempt to implement Shirley Ellis's legendary "Name Game".

Write an HTML page with accompanying JavaScript that reads in the user's name and then prints out the corresponding verse of "The Name Game". For example, if the user entered "Nick", the page would print

Nick, Nick bo Bick
Banana Fanna Fo Fick
Mee Mi Mo Mick
Nick

If you don't remember the rules to the name game, make up your own. Recall that some names are treated differently (e.g., Bob, which begins with "B" which is used as a modifier in the first stanza).

Alternate

If you'd prefer, you may instead want to do the introductory assignment. If you're feeling really adventuresome, consider the advanced assignment.


[Overview] [Basics] [More] [Fun] [Class 2] [If] [Functions] [Timing] [Queries] [References] [Examples] [Libraries] [Assignments]

Source text written by Samuel A. Rebelsky.

Source text last modified Mon Apr 6 10:42:05 1998.

This page generated on Wed Apr 8 14:05:57 1998 by SiteWeaver.