A Little Math Quiz in JavaScript
Overview: In this exercise you
will customize a JavaScript math quiz.
Click the plus sign graphic
and/or the PROBLEM button to see what the JavaScript functions
do, then
make some changes in the JavaScript
(different limits for the random numbers,
multiplication instead of addition, etc.)
In the HTML code for this page, you will find two JavaScript functions
that do the following (see JSMathDrill.doc
for more details):
- getNum() chooses two
random numbers (X and Y) between 0 and 10, then passes them on to (and
starts) the
Problem(X,Y) function
- Problem(X,Y) takes the
two random numbers, displays them as an addition problem, asks for an
answer, checks the answer, and gives feedback (RIGHT or WRONG)
Click on the plus sign graphic and/or
the PROBLEM button to start
getNum() (and see one problem).
