Return Home Weary Traveller

In this example, x, y, and z are variables.

  1. alert('insert text here');
  2. Variables
  3. Names can contain letters, digits, underscores, and dollar signs.
    Names must begin with a letter, a $ sign or an underscore (_).
    Names are case sensitive (X is different from x).
    Reserved words (JavaScript keywords) cannot be used as names.
    Names cannot start with numbers
  4. Values, Operators, Expressions, Keywords, and Comments.
  5. global vs block scope. Global means a variable will be recognized everywhere, in every part of the document no matter what. Block. A paragraph, heading or div are all blocks. Using Let or Const limits the variable to block scope. It will only be recognized in the block it is nested in

My First JavaScript

The window.print() Method

Click the button to print the current page.

Display some text when the checkbox is checked: