About JavaScript

  • Revision slug: JavaScript/About_JavaScript
  • Revision title: About JavaScript
  • Revision id: 6594
  • Created:
  • Creator: BenoitL
  • Is current revision? No
  • Comment /* JavaScript resources */ JavaScript Language resources has been migrated to MDC

Revision Content

What is JavaScript?

JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard.

Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as if statements, for and while loops, and switch and try ... catch blocks function the same as in these languages (or nearly so.)

JavaScript can function as both a procedural and an object oriented language. Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like C++ and Java. Once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.

JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for ... in), and source code recovery (JavaScript programs can decompile function bodies back into their source text)

Intrinsic objects are Number, String, Boolean, Date, RegExp, and Math.

For a more in depth discussion of JavaScript programming follow the JavaScript resources links below.

What JavaScript implementations are available?

mozilla.org hosts two JavaScript implementations. The first ever JavaScript was created by Brendan Eich at Netscape, and has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. This engine, code named SpiderMonkey, is implemented in C. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 3 compliant.

Each mozilla.org JavaScript engine exposes a public API applications can call on for JavaScript support. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create 'host objects' responsible for reflecting the DOM into JavaScript.

Another common application for JavaScript is as a (web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages.

For more information on embedding JavaScript in your own applications, follow either the SpiderMonkey or Rhino links below, or visit us on the netscape.public.mozilla.jseng newsgroup.

JavaScript resources

SpiderMonkey embedding
Information specific to JavaScript in C engine (aka SpiderMonkey) embedding.
Rhino embedding
Information specific to JavaScript in Java engine (aka Rhino) embedding.
Language resources
Pointers to published JavaScript standards, LiveConnect documents, and work on JavaScript 2.0.
Scripting resources
Pointers to JavaScript scripting resources, including recommended reading, online references and tutorials, and sample code.
Projects page
Lists other projects using the open source JavaScript engines.
Test library page
Information about the core JavaScript test suite.
mozilla.dev.tech.js-engine
The newsgroup for discussion about the JavaScript engines, browser scripting issues can be directed to the mozilla.dev.tech.javascript group.
{{ wiki.languages( { "fr": "fr/\u00c0_propos_de_JavaScript" } ) }}

Revision Source

<p>
</p>
<h3 name="What_is_JavaScript.3F"> What is JavaScript? </h3>
<p><a class="external" href="http://www.instantweb.com/~foldoc/foldoc.cgi?query=javascript">JavaScript</a> is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard.
</p><p>Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as if statements, for and while loops, and switch and try ... catch blocks function the same as in these languages (or nearly so.)
</p><p>JavaScript can function as both a <a class="external" href="http://www.instantweb.com/~foldoc/foldoc.cgi?query=procedural&amp;action=Search">procedural</a> and an <a class="external" href="http://www.instantweb.com/~foldoc/foldoc.cgi?query=object+oriented&amp;action=Search">object oriented language</a>. Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects <b>at run time</b>, as opposed to the syntactic class definitions common in compiled languages like C++ and Java. Once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.
</p><p>JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via <code>eval</code>), object introspection (via <code>for ... in</code>), and source code recovery (JavaScript programs can decompile function bodies back into their source text)
</p><p>Intrinsic objects are <code>Number</code>, <code>String</code>, <code>Boolean</code>, <code>Date</code>, <code>RegExp</code>, and <code>Math</code>.
</p><p>For a more in depth discussion of JavaScript programming follow the <a href="#JavaScript_resources">JavaScript resources</a> links below.
</p>
<h3 name="What_JavaScript_implementations_are_available.3F"> What JavaScript implementations are available? </h3>
<p>mozilla.org hosts two JavaScript implementations. The first <b>ever</b> JavaScript was created by Brendan Eich at Netscape, and has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. This engine, code named <a href="en/SpiderMonkey">SpiderMonkey</a>, is implemented in C. The <a href="en/Rhino">Rhino</a> engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 3 compliant.
</p><p>Each mozilla.org JavaScript engine exposes a public API applications can call on for JavaScript support. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create 'host objects' responsible for reflecting the <a class="external" href="http://www.w3.org/DOM/">DOM</a> into JavaScript.
</p><p>Another common application for JavaScript is as a (web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages.
</p><p>For more information on embedding JavaScript in your own applications, follow either the SpiderMonkey or Rhino links below, or visit us on the netscape.public.mozilla.jseng newsgroup.
</p>
<h3 name="JavaScript_resources"> JavaScript resources </h3>
<dl><dt> <a class="external" href="http://www.mozilla.org/js/spidermonkey/">SpiderMonkey embedding</a>
</dt><dd> Information specific to JavaScript in C engine (aka SpiderMonkey) embedding.
</dd></dl>
<dl><dt> <a class="external" href="http://www.mozilla.org/rhino/">Rhino embedding</a>
</dt><dd> Information specific to JavaScript in Java engine (aka Rhino) embedding.
</dd></dl>
<dl><dt> <a href="en/JavaScript_Language_Resources">Language resources</a>
</dt><dd> Pointers to published JavaScript standards, LiveConnect documents, and work on JavaScript 2.0.
</dd></dl>
<dl><dt> <a class="external" href="http://www.mozilla.org/js/scripting/">Scripting resources</a>
</dt><dd> Pointers to JavaScript scripting resources, including recommended reading, online references and tutorials, and sample code.
</dd></dl>
<dl><dt> <a class="external" href="http://www.mozilla.org/js/projects.html">Projects page</a>
</dt><dd> Lists other projects using the open source JavaScript engines.
</dd></dl>
<dl><dt> <a class="external" href="http://www.mozilla.org/js/tests/library.html">Test library page</a>
</dt><dd> Information about the core JavaScript test suite.
</dd></dl>
<dl><dt> <a class="external" href="http://groups.google.com/group/mozilla.dev.tech.js-engine">mozilla.dev.tech.js-engine</a>
</dt><dd> The newsgroup for discussion about the <b>JavaScript engines</b>, browser scripting issues can be directed to the <a class="external" href="http://groups.google.com/group/mozilla.dev.tech.javascript">mozilla.dev.tech.javascript</a> group.
</dd></dl>
{{ wiki.languages( { "fr": "fr/\u00c0_propos_de_JavaScript" } ) }}
Revert to this revision