Example: Printing values
To run the program, click on the Load page button. Be ready to click on the window that appears in order to dismiss it. (This is the last time we will use alert
in this course; you will probably wish to avoid it in the future as well.) On the right side of the screen, the top pane will show the web page created and the bottom pane will show the console. The page on JavaScript panels gives more information on the features you can use. For now, ignore the little triangle to the left of line 5 below (we will explain it later).
Notice the order in which the writes to the consoleA window used for debugging, usually not visible on the page. appear. It matches the order in which the scriptsA JavaScript program. appear (or are referenced) in the HTML document. Other features to notice are the syntax for scripts, the various ways to print values, and the use of comments.
Note:
Hints:
- undefined