Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 656061 of About this Guide

  • Revision slug: Web/JavaScript/Guide/About
  • Revision title: About this Guide
  • Revision id: 656061
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment Revert to revision of 2014-06-29 01:16:57 by cse031sust02: "Undo translation in place to Portuguese."

Revision Content

JavaScript is a cross-platform, object-based scripting language. This guide explains everything you need to know about using JavaScript.

New features in JavaScript versions

{{ JSGVersions() }}

What you should already know ?

This guide assumes you have the following basic background:

  • A general understanding of the Internet and the World Wide Web (WWW).
  • Good working knowledge of HyperText Markup Language (HTML).
  • Some programming experience. If you are new to programming, try one of the tutorials linked on the page JavaScript

JavaScript versions

Table 1 JavaScript and Navigator versions
JavaScript version Navigator version
JavaScript 1.0 Navigator 2.0
JavaScript 1.1 Navigator 3.0
JavaScript 1.2 Navigator 4.0-4.05
JavaScript 1.3 Navigator 4.06-4.7x
JavaScript 1.4  
JavaScript 1.5 Navigator 6.0
Mozilla (open source browser)
JavaScript 1.6 Firefox 1.5, other Mozilla 1.8-based products
JavaScript 1.7 Firefox 2, other Mozilla 1.8.1-based products
JavaScript 1.8 Firefox 3, other Gecko 1.9-based products

Where to find JavaScript information

JavaScript documentation includes the following books:

If you are new to JavaScript, start with the JavaScript Guide. Once you have a firm grasp of the fundamentals, you can use the JavaScript Reference to get more details on individual objects and statements.

Tips for learning JavaScript

Getting started with JavaScript is easy: all you need is a modern Web browser. This guide includes some JavaScript features which are only currently available in the latest versions of Firefox (and other Gecko powered browsers), so using the most recent version of Firefox is recommended.

There are two tools built into Firefox that are useful for experimenting with JavaScript: the Web Console and Scratchpad.

The Web Console

The Web Console shows you information about the currently loaded Web page, and also includes a command line that you can use to execute JavaScript expressions in the current page.

To open the Web Console, select "Web Console" from the "Web Developer" menu, which is under the "Tools" menu in Firefox. It appears at the bottom of the browser window. Along the bottom of the console is a command line that you can use to enter JavaScript, and the output appears in the pane above:

Scratchpad

The Web Console is great for executing single lines of JavaScript, but although you can execute multiple lines, it's not very convenient for that, and you can't save your code samples using the Web Console. So for more complex examples Scratchpad is a better tool.

To open Scratchpad, select "Scratchpad" from the "Web Developer" menu, which is under the "Tools" menu in Firefox. It opens in a separate window and is an editor that you can use to write and execute JavaScript in the browser. You can also save scripts to disk and load them from disk.

If you choose "Inspect", the code in your pad is executed in the browser and the result is inserted back into the pad as a comment:

Document conventions

JavaScript applications run on many operating systems; the information in this book applies to all versions. File and directory paths are given in Windows format (with backslashes separating directory names). For Unix versions, the directory paths are the same, except that you use slashes instead of backslashes to separate directories.

This guide uses uniform resource locators (URLs) of the following form:

https://server.domain/path/file.html

In these URLs, server represents the name of the server on which you run your application, such as research1 or www; domain represents your Internet domain name, such as netscape.com or uiuc.edu; path represents the directory structure on the server; and file.html represents an individual file name. In general, items in italics in URLs are placeholders and items in normal monospace font are literals. If your server has Secure Sockets Layer (SSL) enabled, you would use https instead of http in the URL.

This guide uses the following font conventions:

  • The monospace font is used for sample code and code listings, API and language elements (such as method names and property names), file names, path names, directory names, HTML tags, and any text that must be typed on the screen. (Monospace italic font is used for placeholders embedded in code.)
  • Italic type is used for book titles, emphasis, variables and placeholders, and words used in the literal sense.
  • Boldface type is used for glossary terms.
 
{{ autoPreviousNext("JSGChapters") }}

Revision Source

<p>JavaScript is a cross-platform, object-based scripting language. This guide explains everything you need to know about using JavaScript.</p>
<h2 id="New_features_in_JavaScript_versions">New features in JavaScript versions</h2>
<p>{{ JSGVersions() }}</p>
<h2 id="What_you_should_already_know_.3F">What you should already know ?</h2>
<p>This guide assumes you have the following basic background:</p>
<ul>
 <li>A general understanding of the Internet and the World Wide Web (WWW).</li>
 <li>Good working knowledge of HyperText Markup Language (<a href="/en/HTML" title="en/HTML">HTML</a>).</li>
 <li>Some programming experience. If you are new to programming, try one of the tutorials linked on the page <a href="/en-US/docs/JavaScript" title="/en-US/docs/">JavaScript</a></li>
</ul>
<h2 id="JavaScript_versions">JavaScript versions</h2>
<table class="standard-table">
 <caption>
  Table 1 JavaScript and Navigator versions</caption>
 <thead>
  <tr>
   <th scope="col">JavaScript version</th>
   <th scope="col">Navigator version</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>JavaScript 1.0</td>
   <td>Navigator 2.0</td>
  </tr>
  <tr>
   <td>JavaScript 1.1</td>
   <td>Navigator 3.0</td>
  </tr>
  <tr>
   <td>JavaScript 1.2</td>
   <td>Navigator 4.0-4.05</td>
  </tr>
  <tr>
   <td>JavaScript 1.3</td>
   <td>Navigator 4.06-4.7x</td>
  </tr>
  <tr>
   <td>JavaScript 1.4</td>
   <td> </td>
  </tr>
  <tr>
   <td>JavaScript 1.5</td>
   <td>Navigator 6.0<br>
    Mozilla (open source browser)</td>
  </tr>
  <tr>
   <td>JavaScript 1.6</td>
   <td><a href="/en/Firefox_1.5_for_developers" title="en/Firefox_1.5_for_developers">Firefox 1.5</a>, other Mozilla 1.8-based products</td>
  </tr>
  <tr>
   <td>JavaScript 1.7</td>
   <td><a href="/en/Firefox_2_for_developers" title="en/Firefox_2_for_developers">Firefox 2</a>, other Mozilla 1.8.1-based products</td>
  </tr>
  <tr>
   <td>JavaScript 1.8</td>
   <td><a href="/en/Firefox_3_for_developers" title="en/Firefox_3_for_developers">Firefox 3</a>, other Gecko 1.9-based products</td>
  </tr>
 </tbody>
</table>
<h2 id="Where_to_find_JavaScript_information">Where to find JavaScript information</h2>
<p>JavaScript documentation includes the following books:</p>
<ul>
 <li><a href="/en/JavaScript/Guide" title="en/Core_JavaScript_1.5_Guide">JavaScript Guide</a> (this guide) provides information about JavaScript language and its objects.</li>
 <li><a href="/en/JavaScript/Reference" title="en/JavaScript/Reference">JavaScript Reference</a> provides reference material for JavaScript language.</li>
</ul>
<p>If you are new to JavaScript, start with the <a href="/en/JavaScript/Guide" title="en/Core_JavaScript_1.5_Guide">JavaScript Guide</a>. Once you have a firm grasp of the fundamentals, you can use the <a href="/en/JavaScript/Reference" title="en/JavaScript/Reference">JavaScript Reference</a> to get more details on individual objects and statements.</p>
<h2 id="Tips_for_learning_JavaScript">Tips for learning JavaScript</h2>
<p>Getting started with JavaScript is easy: all you need is a modern Web browser. This guide includes some JavaScript features which are only currently available in the latest versions of Firefox (and other Gecko powered browsers), so using the most recent version of Firefox is recommended.</p>
<p>There are two tools built into Firefox that are useful for experimenting with JavaScript: the Web Console and Scratchpad.</p>
<h3 id="The_Web_Console">The Web Console</h3>
<p>The <a href="/en-US/docs/Tools/Web_Console">Web Console</a> shows you information about the currently loaded Web page, and also includes a <a href="/en-US/docs/Tools/Web_Console#The_command_line_interpreter">command line</a> that you can use to execute JavaScript expressions in the current page.</p>
<p>To open the Web Console, select "Web Console" from the "Web Developer" menu, which is under the "Tools" menu in Firefox. It appears at the bottom of the browser window. Along the bottom of the console is a command line that you can use to enter JavaScript, and the output appears in the pane above:</p>
<p><img alt="" src="https://mdn.mozillademos.org/files/7363/web-console-commandline.png" style="display: block; margin-left: auto; margin-right: auto;"></p>
<h3 id="Scratchpad">Scratchpad</h3>
<p>The Web Console is great for executing single lines of JavaScript, but although you can execute multiple lines, it's not very convenient for that, and you can't save your code samples using the Web Console. So for more complex examples <a href="/en-US/docs/Tools/Scratchpad">Scratchpad</a> is a better tool.</p>
<p>To open Scratchpad, select "Scratchpad" from the "Web Developer" menu, which is under the "Tools" menu in Firefox. It opens in a separate window and is an editor that you can use to write and execute JavaScript in the browser. You can also save scripts to disk and load them from disk.</p>
<p>If you choose "Inspect", the code in your pad is executed in the browser and the result is inserted back into the pad as a comment:</p>
<p><img alt="" src="https://mdn.mozillademos.org/files/7365/scratchpad.png" style="display: block; margin-left: auto; margin-right: auto;"></p>
<h2 id="Document_conventions">Document conventions</h2>
<p>JavaScript applications run on many operating systems; the information in this book applies to all versions. File and directory paths are given in Windows format (with backslashes separating directory names). For Unix versions, the directory paths are the same, except that you use slashes instead of backslashes to separate directories.</p>
<p>This guide uses uniform resource locators (URLs) of the following form:</p>
<p><code>https://<em>server</em>.<em>domain</em>/<em>path</em>/<em>file</em>.html</code></p>
<p>In these URLs, <em>server</em> represents the name of the server on which you run your application, such as <code>research1</code> or <code>www</code>; <em>domain</em> represents your Internet domain name, such as <code>netscape.com</code> or <code>uiuc.edu</code>; <em>path</em> represents the directory structure on the server; and <em>file</em><code>.html</code> represents an individual file name. In general, items in italics in URLs are placeholders and items in normal monospace font are literals. If your server has Secure Sockets Layer (SSL) enabled, you would use <code>https</code> instead of <code>http</code> in the URL.</p>
<p>This guide uses the following font conventions:</p>
<ul>
 <li><code>The monospace font</code> is used for sample code and code listings, API and language elements (such as method names and property names), file names, path names, directory names, HTML tags, and any text that must be typed on the screen. (<code><em>Monospace italic font</em></code> is used for placeholders embedded in code.)</li>
 <li><em>Italic type</em> is used for book titles, emphasis, variables and placeholders, and words used in the literal sense.</li>
 <li><strong>Boldface</strong> type is used for glossary terms.</li>
</ul>
<div>
  </div>
<div>
 {{ autoPreviousNext("JSGChapters") }}</div>
Revert to this revision