Example with parameters and parameter transfer

Here you see a function 'displayN' with one parameter, named 'number'. And number is used in a statement with writeln. That statement can display a string in a document in a window of a browser.

Result:

Comment:

You see strings, numbers and to declare such things. Sometimes we call declaring programming. If you 'program' 100 into your source, than the internal parameter 'number' has the value of 100. We call that: the 'programmed number' is 100. The function displays that number at the moment the browser reaches reading the script-tag in the html-file with the line displayN (100). Computer scientists or information specialists says: '100 is declared'.

Remark:

The function 'displayN' is declared on top of the file.

Enschede, 4 nov. 1999; updated: jan, 28, 2003.