The first example illustrates how to declare variables, assign values to them and then display the contents of the variables using the write() method. As with all of the examples, be sure to not only look at the example, but the source for the example as well.
See the example or view the source.
This next example is similar to the first, except that it is a little more detailed, and slightly longer. However, you should not be put off by the length. First, these examples are extremely redundant in the way they present information (which is necessary to present the basic usage of the concepts). Second, there are more concise ways of expressing some of the actions, which we will learn about later.
See the example or view the source.