Skip to content

Commit cf607d6

Browse files
fiji-flowbamberg
authored andcommitted
web/javascript to markdown - part 2
convert content to md
1 parent 01ff31c commit cf607d6

File tree

905 files changed

+61637
-63954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

905 files changed

+61637
-63954
lines changed

files/en-us/web/javascript/a_re-introduction_to_javascript/index.md

Lines changed: 473 additions & 444 deletions
Large diffs are not rendered by default.

files/en-us/web/javascript/about_javascript/index.md

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,48 @@ tags:
77
- Introduction
88
- JavaScript
99
---
10-
<div>{{JsSidebar}}</div>
10+
{{JsSidebar}}
1111

12-
<h2 id="What_is_JavaScript">What is JavaScript?</h2>
12+
## What is JavaScript?
1313

14-
<p><strong>JavaScript</strong> (often shortened to <strong>JS</strong>) is a lightweight, interpreted, object-oriented language with <a href="https://en.wikipedia.org/wiki/First-class_function">first-class functions</a>, and is best known as the scripting language for Web pages, but it's <a href="https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages">used in many non-browser environments</a> as well. It is a <a class="mw-redirect" href="https://en.wikipedia.org/wiki/Prototype-based_programming" title="Prototype-based">prototype-based</a>, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.</p>
14+
**JavaScript** (often shortened to **JS**) is a lightweight, interpreted, object-oriented language with [first-class functions](https://en.wikipedia.org/wiki/First-class_function), and is best known as the scripting language for Web pages, but it's [used in many non-browser environments](https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages) as well. It is a [prototype-based](https://en.wikipedia.org/wiki/Prototype-based_programming "Prototype-based"), multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.
1515

16-
<p>JavaScript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event. JavaScript is an easy to learn and also powerful scripting language, widely used for controlling web page behavior.</p>
16+
JavaScript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event. JavaScript is an easy to learn and also powerful scripting language, widely used for controlling web page behavior.
1717

18-
<p>Contrary to popular misconception, <strong>JavaScript is <em>not</em> "Interpreted Java"</strong>. In a nutshell, JavaScript is a dynamic scripting language supporting <a href="/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages">prototype based</a> 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 <code>if</code> statements, <code>for</code> and <code>while</code> loops, and <code>switch</code> and <code>try ... catch</code> blocks function the same as in these languages (or nearly so).</p>
18+
Contrary to popular misconception, **JavaScript is _not_ "Interpreted Java"**. In a nutshell, JavaScript is a dynamic scripting language supporting [prototype based](/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#class-based_vs._prototype-based_languages) 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).
1919

20-
<p>JavaScript can function as both a <a href="https://en.wikipedia.org/wiki/Procedural_programming">procedural</a> and an <a href="/en-US/docs/Learn/JavaScript/Objects">object oriented language</a>. Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects <strong>at run time</strong>, 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>
20+
JavaScript can function as both a [procedural](https://en.wikipedia.org/wiki/Procedural_programming) and an [object oriented language](/en-US/docs/Learn/JavaScript/Objects). 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.
2121

22-
<p>JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval">eval</a></code>), object introspection (via <code>for ... in</code>), and source code recovery (JavaScript programs can decompile function bodies back into their source text).</p>
22+
JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via [`eval`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval)), object introspection (via `for ... in`), and source code recovery (JavaScript programs can decompile function bodies back into their source text).
2323

24-
<p>For a more in depth discussion of JavaScript programming follow the <a href="#javascript_resources">JavaScript resources</a> links below.</p>
24+
For a more in depth discussion of JavaScript programming follow the [JavaScript resources](#javascript_resources) links below.
2525

26-
<h2 id="What_JavaScript_implementations_are_available">What JavaScript implementations are available?</h2>
26+
## What JavaScript implementations are available?
2727

28-
<p>The Mozilla project provides two JavaScript implementations. The first <strong>ever</strong> JavaScript was created by Brendan Eich at Netscape, and has since been updated to conform to ECMA-262 Edition 5 and later versions. This engine, code named <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a>, is implemented in C/C++. The <a href="/en-US/docs/Rhino">Rhino</a> engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation written in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 5 compliant.</p>
28+
The Mozilla project provides two JavaScript implementations. The first **ever** JavaScript was created by Brendan Eich at Netscape, and has since been updated to conform to ECMA-262 Edition 5 and later versions. This engine, code named [SpiderMonkey](/en-US/docs/Mozilla/Projects/SpiderMonkey), is implemented in C/C++. The [Rhino](/en-US/docs/Rhino) engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation written in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 5 compliant.
2929

30-
<p>Several major runtime optimizations such as TraceMonkey (Firefox 3.5), JägerMonkey (Firefox 4) and IonMonkey were added to the SpiderMonkey JavaScript engine over time. Work is always ongoing to improve JavaScript execution performance.</p>
30+
Several major runtime optimizations such as TraceMonkey (Firefox 3.5), JägerMonkey (Firefox 4) and IonMonkey were added to the SpiderMonkey JavaScript engine over time. Work is always ongoing to improve JavaScript execution performance.
3131

32-
<p>Besides the above implementations, there are other popular JavaScript engines such as:-</p>
32+
Besides the above implementations, there are other popular JavaScript engines such as:-
3333

34-
<ul>
35-
<li>Google's <a href="https://code.google.com/p/v8/">V8</a>, which is used in the Google Chrome browser and recent versions of Opera browser. This is also the engine used by <a href="http://nodejs.org">Node.js</a>.</li>
36-
<li>The <a href="https://www.webkit.org/projects/javascript/index.html">JavaScriptCore</a> (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari.</li>
37-
<li><a href="http://my.opera.com/ODIN/blog/carakan-faq">Carakan</a> in old versions of Opera.</li>
38-
<li>The <a href="https://en.wikipedia.org/wiki/Chakra_%28JScript_engine%29">Chakra</a> engine used in Internet Explorer (although the language it implements is formally called "JScript" in order to avoid trademark issues).</li>
39-
</ul>
34+
- Google's [V8](https://code.google.com/p/v8/), which is used in the Google Chrome browser and recent versions of Opera browser. This is also the engine used by [Node.js](http://nodejs.org).
35+
- The [JavaScriptCore](https://www.webkit.org/projects/javascript/index.html) (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari.
36+
- [Carakan](http://my.opera.com/ODIN/blog/carakan-faq) in old versions of Opera.
37+
- The [Chakra](https://en.wikipedia.org/wiki/Chakra_%28JScript_engine%29) engine used in Internet Explorer (although the language it implements is formally called "JScript" in order to avoid trademark issues).
4038

41-
<p>Each of Mozilla's JavaScript engines expose a public API which application developers can use to integrate JavaScript into their software. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create <strong>host objects</strong> responsible for reflecting the <a href="https://www.w3.org/DOM/">DOM</a> into JavaScript.</p>
39+
Each of Mozilla's JavaScript engines expose a public API which application developers can use to integrate JavaScript into their software. 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](https://www.w3.org/DOM/) into JavaScript.
4240

43-
<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. <a href="http://nodejs.org">Node.js</a> is a popular example of this.</p>
41+
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. [Node.js](http://nodejs.org) is a popular example of this.
4442

45-
<h2 id="JavaScript_resources">JavaScript resources</h2>
43+
## JavaScript resources
4644

47-
<dl>
48-
<dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a></dt>
49-
<dd>Information specific to Mozilla's implementation of JavaScript in C/C++ engine (aka SpiderMonkey), including how to embed it in applications.</dd>
50-
<dt><a href="/en-US/docs/Rhino">Rhino</a></dt>
51-
<dd>Information specific to the JavaScript implementation written in Java (aka Rhino).</dd>
52-
<dt><a href="/en-US/docs/Web/JavaScript/Language_Resources">Language resources</a></dt>
53-
<dd>Pointers to published JavaScript standards.</dd>
54-
<dt><a href="/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">A re-introduction to JavaScript</a></dt>
55-
<dd><a href="/en-US/docs/Web/JavaScript/Guide">JavaScript guide</a> and <a href="/en-US/docs/Web/JavaScript/Reference">JavaScript reference</a>.</dd>
56-
</dl>
45+
- [SpiderMonkey](/en-US/docs/Mozilla/Projects/SpiderMonkey)
46+
- : Information specific to Mozilla's implementation of JavaScript in C/C++ engine (aka SpiderMonkey), including how to embed it in applications.
47+
- [Rhino](/en-US/docs/Rhino)
48+
- : Information specific to the JavaScript implementation written in Java (aka Rhino).
49+
- [Language resources](/en-US/docs/Web/JavaScript/Language_Resources)
50+
- : Pointers to published JavaScript standards.
51+
- [A re-introduction to JavaScript](/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
52+
- : [JavaScript guide](/en-US/docs/Web/JavaScript/Guide) and [JavaScript reference](/en-US/docs/Web/JavaScript/Reference).
5753

58-
<p>JavaScript® is a trademark or registered trademark of Oracle in the U.S. and other countries.</p>
54+
JavaScript® is a trademark or registered trademark of Oracle in the U.S. and other countries.

0 commit comments

Comments
 (0)