







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An introduction to wmlscript functions, including how to declare them, use libraries, and implement recursion. It covers topics such as variable types, initialization, conditions, and common language statements.
Typology: Slides
1 / 13
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();
<card
id="card1"> <onevent
type="onenterforward">
<setvar
name="nFact"
value="<untested>"
Enter N
<input
name="n"
format="N*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;