Worked Example



Function to Determine if a number is less than 80

The Program as JS Code

Here is how the code for the program is written in JS.

The concept is still that there is a controlling MAIN routine which calls a SUBROUTINE

image of function


Running the Function

Here is how the code for MAIN routine and SUBROUTINE are written in JS.

The concept is that there is a controlling MAIN routine which calls a SUBROUTINE

This video shows the order in which the program is executed.