







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








extern
function
testValue() {
var
myVar =
Lang.parseInt(WMLBrowser.getVar("myVar"));
if
(((myVar
myVar)
WMLBrowser.setVar("myOddity", "even"); else
WMLBrowser.setVar("myOddity", "odd"); WMLBrowser.refresh();
Enter N
Click here
to
find N!
factorial").
N!
$(nFact).
extern
function
factorial()
var
n^
Lang.parseInt(WMLBrowser.getVar("n")); if
(n
n^
WMLBrowser.setVar("nFact",
recurseFactorial(n)
WMLBrowser.refresh(); } extern
function
recurseFactorial(n)
if
(n
return
n
recurseFactorial(n-
else
return
n;