Content deleted Content added
Undid revision 832350868 by Julian Kandlhofer (talk) |
Undid revision 832350323 by Julian Kandlhofer (talk) |
||
Line 2:
{{Infobox programming language
| name = JavaScript
| logo alt = ▼
| paradigm = [[Multi-paradigm]]: [[object-oriented programming|object-oriented]] ([[prototype-based programming|prototype-based]]), [[imperative programming|imperative]], [[functional programming|functional]], [[event-driven programming|event-driven]]{{Sfn|Flanagan|2011|pp =1–2}}▼
▲| logo alt =
| designer = [[Brendan Eich]]▼
▲| paradigm = [[Multi-paradigm]]: [[object-oriented programming|object-oriented]] ([[prototype-based programming|prototype-based]]), [[imperative programming|imperative]], [[functional programming|functional]], [[event-driven programming|event-driven]]{{Sfn|Flanagan|2011|pp =1–2}}
| developer = [[Netscape|Netscape Communications Corporation]], [[Mozilla Foundation]], [[Ecma International]]▼
▲| designer = [[Brendan Eich]]
| typing = [[Dynamic typing|Dynamic]], [[Duck typing|duck]]▼
▲| developer = [[Netscape|Netscape Communications Corporation]], [[Mozilla Foundation]], [[Ecma International]]
| implementations = [[V8 (JavaScript engine)|V8]], [[JavaScriptCore]], [[SpiderMonkey (JavaScript engine)|SpiderMonkey]], [[Chakra (JScript engine)|Chakra]]▼
▲| typing = [[Dynamic typing|Dynamic]], [[Duck typing|duck]]
| influenced = [[ActionScript]], [[AtScript]], [[CoffeeScript]], [[Dart (programming language)|Dart]], [[JScript .NET]], [[LiveScript]], [[Objective-J]], [[Opa (programming language)|Opa]], [[Perl 6]], [[QML]], [[TypeScript]]▼
▲| implementations = [[V8 (JavaScript engine)|V8]], [[JavaScriptCore]], [[SpiderMonkey (JavaScript engine)|SpiderMonkey]], [[Chakra (JScript engine)|Chakra]]
| license = ▼
▲| influenced = [[ActionScript]], [[AtScript]], [[CoffeeScript]], [[Dart (programming language)|Dart]], [[JScript .NET]], [[LiveScript]], [[Objective-J]], [[Opa (programming language)|Opa]], [[Perl 6]], [[QML]], [[TypeScript]]
| File extensions = <code>.js</code>
▲| license =
| File
| website = [https://developer.mozilla.org/en-US/docs/Web/JavaScript Mozilla]▼
| wikibooks = JavaScript▼
▲| website = [https://developer.mozilla.org/en-US/docs/Web/JavaScript Mozilla]
| year = {{start date and age|1995|12|04}}<ref name="press_release">[https://web.archive.org/web/20070916144913/http://wp.netscape.com/newsref/pr/newsrelease67.html Press release announcing JavaScript], "Netscape and Sun announce JavaScript", PR Newswire, December 4, 1995</ref>▼
▲| wikibooks = JavaScript
▲| year = {{start date and age|1995|12|04}}<ref name="press_release">[https://web.archive.org/web/20070916144913/http://wp.netscape.com/newsref/pr/newsrelease67.html Press release announcing JavaScript], "Netscape and Sun announce JavaScript", PR Newswire, December 4, 1995</ref>
| latest_release_version = ECMAScript 2017<ref name="auto">{{cite web|url=https://www.ecma-international.org/publications/standards/Ecma-262.htm|title=Standard ECMA-262|publisher=Ecma International|date=2017-07-03}}</ref>
| latest_release_date = {{start date and age|2017|6}}
| latest_preview_version =
| latest_preview_date =
| influenced_by = [[Lua (programming language)|Lua]], [[Scheme (programming language)|Scheme]], [[Perl]], [[Self (programming language)|Self]], [[Java (programming language)|Java]], [[C (programming language)|C]], [[Python (programming language)|Python]], [[AWK]], [[HyperTalk]] <!--True for first JavaScript? Or only ECMAScript – later JavaScript versions-->
}}
Line 186 ⟶ 185:
=== Simple examples ===
[[Variable (computer science)|Variables]] in JavaScript can be defined using the <
▲[[Variable (computer science)|Variables]] in JavaScript can be defined using the <code>var</code> keyword:<ref>{{cite web | url=https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/var | title=var – JavaScript – MDN | publisher=The [[Mozilla Developer Network]] | accessdate=22 December 2012}}</ref>
<syntaxhighlight lang="javascript">
Line 197 ⟶ 194:
Note the [[Comment (computer programming)|comments]] in the example above, all of which were preceded with two [[Slash (punctuation)|forward slashes]].
There is no built-in [[Input/output|I/O]] functionality in JavaScript; the run-time environment provides that. The ECMAScript specification in edition 5.1 mentions:<ref>{{cite web | url=http://www.ecma-international.org/ecma-262/5.1/#sec-4 | title=ECMAScript Language Specification – ECMA-262 Edition 5.1|publisher=[[Ecma International]] | accessdate=22 December 2012}}</ref>
|