e01.org

JavaScript

JavaScript (JS) is a programming language and core technology of the Web, alongside HTML and CSS. Created by Brendan Eich in 1995, it is maintained by Ecma International's TC39 technical committee, with related Web APIs maintained by W3C and WHATWG. As of 2025, JavaScript is the most widely used programming language on GitHub. However, TypeScript, which is a version of JavaScript that is strict about types and is statically typed, overtook JavaScript on GitHub by August 2025. Web browsers have a dedicated JavaScript engine that executes the client code. These engines are also utilized in some servers and a variety of apps. The most popular runtime system for non-browser usage is Node.js. JavaScript is a high-level, often just-in-time–compiled language that conforms to the ECMAScript standard. It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has...

JavaScript (JS) is a programming language and core technology of the Web, alongside HTML and CSS. Created by Brendan Eich in 1995, it is maintained by Ecma International's TC39 technical committee, with related Web APIs maintained by W3C and WHATWG. As of 2025, JavaScript is the most widely used programming language on GitHub. However, TypeScript, which is a version of JavaScript that is strict about types and is statically typed, overtook JavaScript on GitHub by August 2025. Web browsers have a dedicated JavaScript engine that executes the client code. These engines are also utilized in some servers and a variety of apps. The most popular runtime system for non-browser usage is Node.js. JavaScript is a high-level, often just-in-time–compiled language that conforms to the ECMAScript standard. It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures, and the Document Object Model (DOM). The ECMAScript standard does not include any input/output (I/O), such as networking, storage, or graphics facilities. In practice, the web browser or other runtime system provides JavaScript APIs for I/O. Although Java and JavaScript are similar in name and syntax, the two languages are distinct and differ greatly in design. In JavaScript, an object is an associative array, augmented with a prototype (see below); each key provides the name for an object property, and there are two syntactical ways to specify such a name: dot notation ( obj.x = 10 ) and bracket notation ( obj["x"] = 10 ). A property may be added, rebound, or deleted at run-time. Most properties of an object (and any property that belongs to an object's prototype inheritance chain) can be enumerated using a for...in loop. JavaScript uses prototypes where many other object-oriented languages use classes for inheritance, but it's still possible to simulate most class-based features with the prototype system. Additionally, ECMAScript version 6 (released June 2015) introduced the keywords class, extends and super, which serve as syntactic sugar to abstract the underlying prototypal inheritance system with a more conventional interface. Constructors are declared by specifying a method named constructor, and all classes are automatically subclasses of the base class Object, similarly to Java. class Person { constructor(name) { this.name = name; } } class Student extends Person { constructor(name, id) { super(name); this.id = id; } } const bob = new Student("Robert", 12345); console.log(bob.name); // Robert Though the underlying object mechanism is still based on prototypes, the newer syntax is similar to other object oriented languages. Private variables are declared by prefixing the field name with a number sign (#), and polymorphism is not directly supported, although it can be emulated by manually calling different functions depending on the number and type of arguments provided. Functions double as object constructors, along with their typical role. Prefixing a function call with new will create an instance of a prototype, inheriting properties and methods from the constructor (including properties from the Object prototype). ECMAScript 5 offers the Object.create method, allowing explicit creation of an instance without automatically inheriting from the Object prototype (older environments can assign the prototype to null ). The constructor's prototype property determines the object used for the new object's internal prototype. New methods can be added by modifying the prototype of the function used as a constructor. // This code is completely equivalent to the previous snippet function Person(name) { this.name = name; } function Student(name, id) { Person.call(this, name); this.id = id; } var bob = new Student("Robert", 12345); console.log(bob.name); // Robert JavaScript's built-in classes, such as Array and Object , also have prototypes that can be modified. However, it's generally considered bad practice to modify built-in objects, because third-party code may use or inherit methods and properties from these objects, and may not expect the prototype to be modified. // Declares a function-scoped variable named `x`, and implicitly assigns the // special value `undefined` to it. Variables without value are automatically // set to undefined. // var is generally considered bad practice and let and const are usually preferred. var x; // Variables can be manually set to `undefined` like so let x2 = undefined; // Declares a block-scoped variable named `y`, and implicitly sets it to // `undefined`. The `let` keyword was introduced in ECMAScript 2015. let y; // Declares a block-scoped, un-reassignable variable named `z`, and sets it to // a string literal. The `const` keyword was also introduced in ECMAScript 2015, // and must be explicitly assigned to. // The keyword `const` means constant, hence the variable cannot be reassigned // as the value is `constant`. const z = "this value cannot be reassigned!"; // Declares a global-scoped variable and assigns 3. This is generally considered // bad practice, and will not work if strict mode is on. t = 3; // Declares a variable named `myNumber`, and assigns a number literal (the value // `2`) to it. let myNumber = 2; // Reassigns `myNumber`, setting it to a string literal (the value `"foo"`). // JavaScript is a dynamically-typed language, so this is legal. myNumber = "foo"; Note the comments in the examples above, all of which were preceded with two forward slashes. More examples can be found at the Wikibooks page on JavaScript syntax examples.

References

  1. ^ / ˈ dʒ ɑː v ə s k r ɪ p t / ⓘ Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  2. ^ SC Magazine UK, Developer's 11 lines of deleted code 'breaks the internet' Archived February 23, 2017, at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  3. ^ Mozilla Corporation, Buffer overflow in crypto.signText() Archived 2014-06-04 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  4. ^ Festa, Paul (19 August 1998). "Buffer-overflow bug in IE" . CNET . Archived from the original on 25 December 2002. Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  5. ^ SecurityTracker.com, Apple Safari JavaScript Buffer Overflow Lets Remote Users Execute Arbitrary Code and HTTP Redirect Bug Lets Remote Users Access Files Archived 2010-02-18 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  6. ^ SecurityFocus, Microsoft WebViewFolderIcon ActiveX Control Buffer Overflow Vulnerability Archived 2011-10-11 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  7. ^ Fusion Authority, Macromedia Flash ActiveX Buffer Overflow Archived August 13, 2011, at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  8. ^ "Protected Mode in Vista IE7 – IEBlog" . Blogs.msdn.com . 9 February 2006. Archived from the original on 23 January 2010 . Retrieved 24 February 2017 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  9. ^ US CERT, Vulnerability Note VU#713878: Microsoft Internet Explorer does not properly validate source of redirected frame Archived 2009-10-30 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  10. ^ Mozilla Foundation, Mozilla Foundation Security Advisory 2005–41: Privilege escalation via DOM property overrides Archived 2014-06-04 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  11. ^ Andersen, Starr (9 August 2004). "Part 5: Enhanced Browsing Security" . TechNet . Microsoft Docs . Changes to Functionality in Windows XP Service Pack 2 . Retrieved 20 October 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  12. ^ "TC39 - Specifying JavaScript" . tc39.es . Retrieved 25 April 2026 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  13. ^ For one example of a rare JavaScript Trojan Horse, see Symantec Corporation, JS.Seeker.K Archived 2011-09-13 at the Wayback Machine Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  14. ^ Gruss, Daniel; Maurice, Clémentine; Mangard, Stefan (24 July 2015). "Rowhammer.js: A Remote Software-Induced Fault Attack in JavaScript". arXiv : 1507.06955 [ cs.CR ]. Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  15. ^ Jean-Pharuns, Alix (30 July 2015). "Rowhammer.js Is the Most Ingenious Hack I've Ever Seen" . Motherboard . Vice . Archived from the original on 27 January 2018 . Retrieved 26 January 2018 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  16. ^ Goodin, Dan (4 August 2015). "DRAM 'Bitflipping' exploit for attacking PCs: Just add JavaScript" . Ars Technica . Archived from the original on 27 January 2018 . Retrieved 26 January 2018 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  17. ^ Auerbach, David (28 July 2015). "Rowhammer security exploit: Why a new security attack is truly terrifying" . slate.com . Archived from the original on 30 July 2015 . Retrieved 29 July 2015 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  18. ^ AnC Archived 2017-03-16 at the Wayback Machine VUSec, 2017 Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  19. ^ New ASLR-busting JavaScript is about to make drive-by exploits much nastier Archived 2017-03-16 at the Wayback Machine Ars Technica, 2017 Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  20. ^ Spectre Attack Archived 2018-01-03 at the Wayback Machine Spectre Attack Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  21. ^ "Benchmark.js" . benchmarkjs.com . Archived from the original on 19 December 2016 . Retrieved 6 November 2016 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  22. ^ "JavaScript technologies overview - JavaScript | MDN" . MDN Web Docs . 27 October 2025 . Retrieved 25 April 2026 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  23. ^ "Edge Browser Switches WebAssembly to 'On' -- Visual Studio Magazine" . Visual Studio Magazine . Archived from the original on 10 February 2018 . Retrieved 9 February 2018 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  24. ^ "frequently asked questions" . asm.js. Archived from the original on 4 June 2014 . Retrieved 13 April 2014 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  25. ^ Figure includes TypeScript , a strict syntactical superset of JavaScript that compiles to JavaScript. GitHub's 2025 Octoverse report groups the two languages together when measuring combined usage. Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  26. ^ GitHub (28 October 2025). "Octoverse 2025: A new developer joins GitHub every second as AI leads TypeScript to #1" . The GitHub Blog . Chart: "JavaScript & TypeScript have the largest combined usage" . Retrieved 25 April 2026 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  27. ^ "TypeScript rises to the top on GitHub" . InfoWorld . Retrieved 10 July 2026 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  28. ^ "Stack Overflow Developer Survey 2025" . Stack Overflow . Retrieved 10 October 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  29. ^ Enzer, Larry (31 August 2018). "The Evolution of the Web Browsers" . Monmouth Web Developers . Archived from the original on 31 August 2018 . Retrieved 31 August 2018 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  30. ^ "Netscape Communications Corp.", Browser enhancements. Encyclopædia Britannica 2006 Ultimate Reference Suite DVD Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  31. ^ a b Mahemoff, Michael (17 December 2009). "Server-Side JavaScript, Back with a Vengeance" . readwrite.com . Archived from the original on 17 June 2016 . Retrieved 16 July 2016 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  32. ^ "Microsoft Internet Explorer 3.0 Beta Now Available" . microsoft.com . Microsoft. 29 May 1996. Archived from the original on 24 November 2020 . Retrieved 16 July 2016 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  33. ^ McCracken, Harry (16 September 2010). "The Unwelcome Return of "Best Viewed with Internet Explorer" " . technologizer.com . Archived from the original on 23 June 2018 . Retrieved 16 July 2016 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  34. ^ Weber, Tim (9 May 2005). "The assault on software giant Microsoft" . BBC News . Archived from the original on 25 September 2017. Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  35. ^ "Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome" . PC Games Hardware . Computec Media AG. 3 July 2009. Archived from the original on 2 May 2012 . Retrieved 28 June 2010 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  36. ^ Purdy, Kevin (11 June 2009). "Lifehacker Speed Tests: Safari 4, Chrome 2" . Lifehacker . Archived from the original on 14 April 2021 . Retrieved 8 May 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  37. ^ "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog" . Archived from the original on 4 December 2015 . Retrieved 22 July 2020 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  38. ^ "Mozilla asks, 'Are we fast yet?' " . Wired . Archived from the original on 22 June 2018 . Retrieved 18 January 2019 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  39. ^ "ECMAScript 6: New Features: Overview and Comparison" . es6-features.org . Archived from the original on 18 March 2018 . Retrieved 19 March 2018 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  40. ^ Professional Node.js: Building JavaScript Based Scalable Software Archived 2017-03-24 at the Wayback Machine , John Wiley & Sons, 01-Oct-2012 Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  41. ^ Lawton, George (19 July 2018). "The secret history behind the success of npm and Node" . TheServerSide . Archived from the original on 2 August 2021 . Retrieved 2 August 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  42. ^ Brown, Paul (13 January 2017). "State of the Union: npm" . Linux.com . Archived from the original on 2 August 2021 . Retrieved 2 August 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  43. ^ "The TC39 Process" . tc39.es . Ecma International. Archived from the original on 7 February 2021 . Retrieved 15 January 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  44. ^ "ECMAScript proposals" . TC39. Archived from the original on 4 December 2020 . Retrieved 15 January 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  45. ^ "U.S. Trademark Serial No. 75026640" . uspto.gov . United States Patent and Trademark Office . 6 May 1997. Archived from the original on 13 July 2021 . Retrieved 8 May 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  46. ^ "Legal Notices" . oracle.com . Oracle Corporation . Archived from the original on 5 June 2021 . Retrieved 8 May 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  47. ^ "Oracle to buy Sun in $7.4-bn deal" . The Economic Times . 21 April 2009. Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  48. ^ Claburn, Thomas (17 September 2024). "Oracle urged again to give up JavaScript trademark" . The Register . Retrieved 2 February 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  49. ^ Krill, Paul (20 September 2024). "JavaScript community challenges Oracle's JavaScript trademark" . InfoWorld . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  50. ^ "Using jQuery with Bootstrap" . clouddevs.com . 10 June 2019 . Retrieved 17 March 2024 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  51. ^ "Vanilla JS" . vanilla-js.com . 16 June 2020. Archived from the original on 16 June 2020 . Retrieved 17 June 2020 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  52. ^ "Server-Side JavaScript Guide" . oracle.com . Oracle Corporation . 11 December 1998. Archived from the original on 11 March 2021 . Retrieved 8 May 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  53. ^ Clinick, Andrew (14 July 2000). "Introducing JScript .NET" . Microsoft Developer Network . Microsoft. Archived from the original on 10 November 2017 . Retrieved 10 April 2018 . [S]ince the 1996 introduction of JScript version 1.0 ... we've been seeing a steady increase in the usage of JScript on the server—particularly in Active Server Pages (ASP) Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  54. ^ "JavaScript for Acrobat" . adobe.com . 7 August 2009. Archived from the original on 7 August 2009 . Retrieved 18 August 2009 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  55. ^ treitter (2 February 2013). "Answering the question: "How do I develop an app for GNOME?" " . livejournal.com . Archived from the original on 11 February 2013 . Retrieved 7 February 2013 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  56. ^ Ponge, Julien (19 April 2018). "Oracle Nashorn: A Next-Generation JavaScript Engine for the JVM" . oracle.com . Oracle Corporation . Retrieved 17 February 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  57. ^ "Migration Guide from Nashorn to GraalJS" . graalvm.org . Retrieved 17 February 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  58. ^ "GraalJS" . GraalVM . Retrieved 17 February 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  59. ^ "Java Interoperability" . oracle.com . Oracle . Retrieved 17 February 2025 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
  60. ^ "Tessel 2... Leverage all the libraries of Node.JS to create useful devices in minutes with Tessel" . tessel.io . Archived from the original on 26 May 2021 . Retrieved 8 May 2021 . Wikipedia revision 1378180047, retrieved 2026-11-21 · 1795215600.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"JavaScript". 1791010674. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378180047

JSON record · API collection · citation policy