Operator examples

The first operator example is a short script called Operator.htm. It illustrates the use of the unary increment operator, as well as the standard mathematical operators.
See the example, or view the source.


The next example is If.htm, which illustrates the use of the if statement for conditional branching in programs.
See the example, or view the source.


The final example is Xmas.htm. The script utilises a couple of different mathematical operators, as well as dynamically generated HTML based on conditional expressions.
See the example, or view the source.


Finally, I've included a slightly different version of Xmas.htm to have a look at. It's only a slight variation in the code, but the results are rather different. You should feel free to copy the source code from these or any other examples and tailor them to suit your own needs.
See the example, or view the source.