documents by either copying and pasting them or, more commonly,
including them as part of a
The equivalent of the
function (or method).
// for a single-line comment or surround it
*/ for a multiline comment.
local scope by preceding it with the
var keyword upon first assignment.
To display the URL assigned to the link with an ID of
thislink in all main browsers, you can use
the two following commands:
The commands to change to the previous page in the browser’s history array are:
To replace the current document with the main page at the oreilly.com website, you could use the following command:
document.location.href = 'http://oreilly.com'