Java Script
Java Script
JavaScript
Paradigm Multi-paradigm: event-driven, functional, imperativ
e, procedural, object-oriented programming
contributed to the ECMAScript standard
ago
Typing Dynamic, weak, duck
discipline
.js
Filename
.cjs
extensions
.mjs [4]
Website www.ecma-international.org/publications-and-
standards/standards/ecma-262/
Major implementations
V8, JavaScriptCore, SpiderMonkey, Chakra
Influenced by
Java,[5][6] Scheme,[6] Self,[7] AWK,[8] HyperTalk[9]
Influenced
ActionScript, AssemblyScript, CoffeeScript, Dart, Haxe, JS++, Objecti
ve-J, Opa, TypeScript
JavaScript at Wikibooks
Contents
1History
o 1.1Creation at Netscape
o 1.2Adoption by Microsoft
o 1.3The rise of JScript
o 1.4Growth and standardization
o 1.5Reaching maturity
2Trademark
3Website client-side usage
o 3.1Examples of scripted behavior
o 3.2Libraries and frameworks
4Other usage
5Features
o 5.1Imperative and structured
o 5.2Weakly typed
o 5.3Dynamic
o 5.4Object-orientation (prototype-based)
o 5.5Functional
o 5.6Delegative
o 5.7Miscellaneous
o 5.8Vendor-specific extensions
6Syntax
o 6.1Simple examples
o 6.2More advanced example
7Security
o 7.1Cross-site vulnerabilities
o 7.2Misplaced trust in the client
o 7.3Misplaced trust in developers
o 7.4Browser and plugin coding errors
o 7.5Sandbox implementation errors
o 7.6Hardware vulnerabilities
8Development tools
9Related technologies
o 9.1Java
o 9.2JSON
o 9.3TypeScript
o 9.4WebAssembly
o 9.5Transpilers
10References
11Further reading
12External links
History[edit]
Creation at Netscape[edit]
The first web browser with a graphical user interface, Mosaic, was released in 1993.
Accessible to non-technical people, it played a prominent role in the rapid growth of
the nascent World Wide Web.[15] The lead developers of Mosaic then founded
the Netscape corporation, which released a more polished browser, Netscape
Navigator, in 1994. This quickly became the most-used.[16][17]
During these formative years of the Web, web pages could only be static, lacking the
capability for dynamic behavior after the page was loaded in the browser. There was
a desire in the flourishing web development scene to remove this limitation, so in
1995, Netscape decided to add a scripting language to Navigator. They pursued two
routes to achieve this: collaborating with Sun Microsystems to embed
the Java programming language, while also hiring Brendan Eich to embed
the Scheme language.[6]
Netscape management soon decided that the best option was for Eich to devise a
new language, with syntax similar to Java and less like Scheme or other extant
scripting languages.[5][6] Although the new language and its interpreter implementation
were called LiveScript when first shipped as part of a Navigator beta in September
1995, the name was changed to JavaScript for the official release in December. [6][1][18]
The choice of the JavaScript name has caused confusion, implying that it is directly
related to Java. At the time, the dot-com boom had begun and Java was the hot new
language, so Eich considered the JavaScript name a marketing ploy by Netscape. [19]
Adoption by Microsoft[edit]
Microsoft debuted Internet Explorer in 1995, leading to a browser war with Netscape.
On the JavaScript front, Microsoft reverse-engineered the Navigator interpreter to
create its own, called JScript.[20]
JScript was first released in 1996, alongside initial support for CSS and extensions
to HTML. Each of these implementations was noticeably different from their
counterparts in Navigator.[21][22] These differences made it difficult for developers to
make their websites work well in both browsers, leading to widespread use of "best
viewed in Netscape" and "best viewed in Internet Explorer" logos for several years. [21]
[23]