User Tools

Site Tools


eg-259:homework:7

Getting Started with JavaScript

Adapted from: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. Supporting: Contact Hour 7.

Write, test and debug (if necessary) HTML5 files that include JavaScript scripts for the following problem. When required to write functions, you must include a script to test the function with at least two different data sets.

  1. Input: Three numbers, using prompt to get each. Output: The largest of the three input numbers. Hint: Use the predefined function Math.max. (See solution: on jsFiddle)

There will be more interesting exercises after the next lecture when control statements have been introduced.


More Homework Exercises

eg-259/homework/7.txt · Last modified: 2013/02/15 12:54 by eechris