Languages and formats

JavaScript

Summary

JavaScript is the programming language that runs inside web browsers, letting pages respond to clicks, load new data and change without reloading. Brendan Eich wrote its first version at Netscape in May 1995, and Netscape and Sun Microsystems announced the name JavaScript on December 4, 1995. Ecma International has standardized the language as ECMAScript (ECMA-262) since June 1997, and as of October 22, 2026, W3Techs detected it on 98.9% of websites.

What JavaScript is

JavaScript is a programming language: a set of written instructions that a computer can follow. Its best-known job is running inside web browsers, but it also runs in other places, such as Node.js on servers and Adobe Acrobat.1

MDN, the developer documentation run by Mozilla, describes JavaScript as a lightweight language that is interpreted or just-in-time compiled. In practice that means the browser turns the code into machine instructions while the page is running, not ahead of time.12

MDN calls JavaScript the third layer of the standard web technologies. HTML gives a page its structure and content, CSS sets its appearance, and JavaScript changes both while the page is open.2

Most of that work goes through browser APIs (application programming interfaces, sets of ready-made functions the browser provides). The Document Object Model, or DOM, is the API that lets a script create, remove and restyle parts of a page.2

Code that runs this way is called client-side code, because it is downloaded and run on the visitor’s own device. Server-side code runs on the web server and sends only its results to the browser.2

In technical terms, MDN lists JavaScript as prototype-based (objects inherit directly from other objects), garbage-collected (unused memory is freed automatically) and dynamic (types are checked while the program runs). It supports several styles of programming, including imperative, functional and object-oriented.1

Despite the name, JavaScript is not a version of Java. MDN warns that the two languages have “very different syntax, semantics, and use,” even though both names are trademarks of Oracle.1

The basic building blocks

According to MDN, JavaScript borrows most of its syntax from Java, C and C++, and was also influenced by Awk, Perl and Python. It is case-sensitive, so a variable named total is a different variable from one named Total.3

A variable is a named place to keep a value. The original keyword for creating one was var. ES2015 added lexical block scoping, which brought let, for a variable that exists only inside its block of code, and const, for one that cannot be reassigned.34

The current standard defines eight data types. Seven are primitives, simple values that cannot be broken down further: Boolean (true or false), null, undefined, Number, BigInt, String (text) and Symbol. The eighth is Object, a collection of named values.3

Ten days at Netscape (1995)

Brendan Eich joined Netscape Communications on April 3, 1995, according to the history he later wrote with Allen Wirfs-Brock for the ACM’s History of Programming Languages conference (HOPL).5

Netscape made Netscape Navigator, which, by estimates later cited in court, had more than 80% of browser usage in January 1996.6

Eich has written that he was recruited with the promise of “doing Scheme” in the browser, Scheme being the language that had drawn him to the job.75

That plan changed. Netscape was negotiating with Sun Microsystems to put Sun’s Java language into Navigator, and Eich writes that upper engineering management required the new scripting language to look like Java. Scheme, Perl, Python and Tcl were all ruled out.7

Eich built the first prototype, code-named Mocha, in ten contiguous days in May 1995. The exact days were not recorded; the HOPL paper says Eich believes they were May 6 to 15.5

The name Mocha was proposed by Netscape co-founder Marc Andreessen, who hoped the language would later be called JavaScript.5

The design borrowed from more than Java. Eich has described the result as a quick cross of the C language and Self, a language built around prototypes, and says he was glad he kept Scheme-style first-class functions: functions that can be stored and passed around like any other value.7

He has also been open about the cost of speed. In a 2008 post he called some of the features copied from Java unfortunate, including date handling that caused year-2000 bugs.7

The public first saw the language in September 1995, under the name LiveScript, in the first beta (test) release of Netscape Navigator 2.0.5

On December 4, 1995, Netscape and Sun announced the name JavaScript in a joint press release.5 The release presented JavaScript as an easy-to-use object scripting language for building online applications and as a way to connect web pages to Java applets, small Java programs embedded in pages.8

It listed 28 companies that endorsed the language, among them America Online, AT&T and Silicon Graphics.8

Navigator 2.0 shipped in March 1996 with JavaScript 1.0, after four more beta releases. Navigator 3.0 followed in August 1996 with JavaScript 1.1.5

JScript, Ecma and the name ECMAScript (1996 to 1999)

Microsoft started building its own version of the language in October 1995, when Robert Welland joined the Internet Explorer team.5

Microsoft’s press release for the Internet Explorer 3.0 beta, dated May 29, 1996, promised “native support for Visual Basic Script and JavaScript.”9 The HOPL paper treats that release as Microsoft’s formal announcement of JavaScript support.5

Microsoft’s implementation was called JScript. It ran inside Active Scripting, a Microsoft system for plugging scripting languages into programs, which shipped in 1996 with Internet Explorer 3 and Microsoft’s IIS web server.5

Building a compatible copy

Welland and Sam McKelvie began with a simple bytecode interpreter (a program that runs a compact, pre-processed form of the code), inspired by JavaScript in Netscape’s public betas. They connected it to a parser from Microsoft’s Developer Division and a garbage collector written by Patrick Dussud.5

To match Netscape’s behavior, Shon Katzenberger and others ran test versions of Internet Explorer 3 against thousands of websites that used JavaScript and compared the results with Netscape 2 and 3. Where the two browsers differed, Katzenberger worked out what Netscape was doing.5

The HOPL paper says the lack of a formal language specification was a constant problem for the JScript team, and that Thomas Reardon, who led the Internet Explorer 3 effort, raised it repeatedly with Netscape.5

Ecma takes over

With two companies shipping their own versions, a shared written standard became more urgent. Netscape applied for membership of Ecma, the standards organization now called Ecma International, and in September 1996 Ecma authorized a start-up meeting.5

The first meeting of the new technical committee, TC39, took place on November 21 and 22, 1996, at Netscape’s offices in Mountain View, California, with thirty people attending.5

The Ecma General Assembly formally approved TC39 in December 1996. Microsoft joined Ecma as an Ordinary Member at the same meeting.5

Ecma’s own page for the standard describes ECMAScript as a language based on several technologies, JavaScript among them.10

The committee’s specification is called ECMA-262, and the language it defines is called ECMAScript. The specification avoids the word JavaScript; the HOPL authors discuss that choice in the same passage as the JavaScript trademark.5

The first edition of ECMA-262 was adopted by the Ecma General Assembly in June 1997.4 A second edition followed in August 1998 and a third in December 1999.10

The third edition, usually shortened to ES3, added regular expressions (patterns for searching and matching text), better string handling, new control statements and try/catch error handling.4

ES3 remained the latest edition for ten years, until December 2009.10 It is also the edition that JSON (JavaScript Object Notation, a text format for exchanging data) was built on: RFC 8259, the internet standard for JSON, says the format is derived from JavaScript’s object literals and cites ES3.11

The stalled years and the rise of Ajax (2000 to 2009)

Work on a fourth edition began after ES3 and ran for nearly ten years across two separate design efforts. It was never finished, and ECMA-262 has no published fourth edition.510

The deadlock ended at a TC39 meeting in Oslo at the end of July 2008. In an August 2008 message to the committee’s public mailing list, Eich reported that all parties would work together on a smaller update, then called ES3.1.12

The same message said some ES4 proposals had been “deemed unsound for the Web” and dropped for good, including packages, namespaces and early binding. The longer-term effort that would follow ES3.1 was named Harmony.12

ES3.1 was published as the fifth edition (ES5) in December 2009, and a corrected edition, 5.1, followed in June 2011.105

ES5 collected features that had emerged since the third edition. They included accessor properties, more ways to create and inspect objects, extra functions for working with arrays, and built-in support for the JSON format.4

ES5 also introduced strict mode, an opt-in setting that makes the language report more errors instead of silently accepting mistakes.4 Focused work on the sixth edition started the same year, 2009.4

Developers did not wait for the standard. On February 18, 2005, Jesse James Garrett of the design firm Adaptive Path published an essay naming a technique he called Ajax.13

Garrett stressed that Ajax was not one new technology but a way of combining several. He cited Google Suggest and Google Maps as examples. He listed the parts: XHTML and CSS for display, the DOM for changing the page, XML and XSLT for data, XMLHttpRequest for fetching data in the background, and JavaScript to tie them together.13

MDN now defines Ajax as fetching content from the server with asynchronous requests and updating parts of the page without reloading all of it. It notes that Ajax was first built on XMLHttpRequest and that the newer fetch() API suits modern web applications better.14

Faster engines and JavaScript on servers (2008 onward)

An engine is the part of a browser that reads and runs JavaScript. Netscape’s first engine grew out of Eich’s 1995 Mocha prototype, which was built into Navigator 2.0 while that browser was still in development.75

After Navigator 3.0 shipped in August 1996, Eich spent two weeks working from home to redesign and reimplement the core engine. He replaced its memory management with a mark-and-sweep garbage collector and added nested functions, function expressions and switch statements.5

The rewritten engine was named SpiderMonkey by Chris Houck, after a line in the film Beavis and Butt-Head Do America. The name became the name of the JavaScript subsystem in Netscape and Mozilla browsers, and Mozilla still uses it.5

Speed became a selling point. When Apple released the first beta of Safari on January 7, 2003, it claimed Safari ran JavaScript more than twice as fast as Internet Explorer for Mac.15

Google raised the stakes in 2008. Announcing Google Chrome on September 1, 2008, Google described its new V8 engine as a more powerful JavaScript engine built for the web applications to come.16

V8 launched with Chrome on September 2, 2008, and its source code was made public the same day.17 It is an open-source engine that runs both JavaScript and WebAssembly.18

The V8 team kept rebuilding its internals. An optimizing compiler called Crankshaft arrived in 2010, its successor TurboFan landed in 2014, and work on an interpreter called Ignition began in 2015.17

In 2017 Ignition and TurboFan became V8’s default pipeline, which allowed the team to remove Crankshaft later.17

V8 also has its own embedding interface, so other programs can use it to run JavaScript.17 That made the next step possible.

Ryan Dahl, then an independent programmer, released an early version of Node.js in June 2009, The Register reported in 2011. He first tried Mozilla’s SpiderMonkey engine, then switched to V8 after about two days.19

Dahl first called the project web.js. After demonstrating it at that year’s JSConf, he was hired by the cloud company Joyent, which became the project’s main steward.19

Node.js describes itself as a “free, open-source, cross-platform JavaScript runtime environment” for building servers, web apps, command-line tools and scripts.20 A runtime is the program that runs code outside a browser.

The project also calls Node.js an asynchronous, event-driven runtime. Instead of waiting for each file read or network request to finish, a Node.js program registers callbacks, and the runtime keeps running its event loop until no callbacks are left.20

The Node.js trademarks are now held by the OpenJS Foundation.20 In 2017 the V8 project formally recognized Node.js as a first-class embedder, a program that builds V8 into itself.17

The yearly language (2015 to today)

The Harmony work produced the sixth edition in June 2015. The specification refers to it as ECMAScript 2015 (ES2015), although ES6 was the more common name while it was being written.510

ES2015 was the largest change since 1999. The specification lists modules, class declarations, lexical block scoping, iterators and generators among its major additions.4

It also added promises for asynchronous programming (a promise is an object that stands for a result that will arrive later), destructuring patterns for unpacking values from objects and arrays, and proper tail calls.4

Class declarations gave the language a dedicated syntax for defining types of objects, and modules let a program be split into separate files that import from one another.421

After 2015 the committee changed how it works. The specification records that ECMAScript 2016 was “the first ECMAScript edition released under Ecma TC39’s new yearly release cadence and open development process.”4

A new edition, named for its year, has appeared every June since.10 ECMAScript 2017, for example, introduced async functions, which give developers a simpler syntax for code that waits on a result, such as a reply from a server.4 The same edition added shared memory and atomics, tools for programs that run several threads at once.4

New features move through a public proposal process run by TC39. The process document defines six stages, a strawperson stage and five maturity stages, and the committee must approve each move from one stage to the next.22

MDN often documents a feature before the official edition that includes it is published, usually between stages 3 and 4, once a browser has implemented it.1

The current edition is ECMAScript 2026, the 17th edition, dated June 2026.104 A companion standard, ECMA-402, covers internationalization, such as formatting dates and numbers for different languages.1

A related language, TypeScript, adds type annotations (labels that say what kind of value a variable holds) on top of JavaScript. TypeScript code is converted to plain JavaScript, with the annotations removed, before it runs in a browser, Node.js, Deno or Bun.23

How a browser runs it

MDN calls each independent executor of JavaScript an agent. An agent works like a single thread: the interpreter can process only one statement at a time.24

Work waiting to run sits in a queue that HTML calls the event loop. Each job runs to completion before the next one starts, and MDN warns that “if a job takes too long to complete, the web application is unable to process user interactions like click or scroll.”24

MDN explains that, because JavaScript is a web scripting language, its model is designed never to block: slow operations such as network requests finish in the background instead of freezing the page.24

Results of asynchronous work, such as a finished download, are added to the queue as new jobs. HTML event loops also keep a higher-priority microtask queue, which is emptied before the next ordinary task is taken.24

Loading order matters too. A classic script with no special attributes is fetched and executed before the browser continues reading the rest of the page.21

The async attribute lets the browser download a script while it keeps reading the page, then run it as soon as it arrives. The defer attribute also downloads in parallel but waits until the page has been read, running scripts in the order they appear.21

Scripts marked type=”module” are deferred by default.21

Security limits

Scripts run inside security limits set by the browser. The best known is the same-origin policy, which restricts how a document or script loaded from one origin can interact with resources from another.25

An origin is the combination of protocol, host and port. A page at http://store.company.com and one at https://store.company.com are different origins, because the protocol differs; so are store.company.com and news.company.com, because the host differs.25

How much of the web uses JavaScript

As of October 22, 2026, W3Techs detected JavaScript as a client-side language on 98.9% of the websites it surveys. About 1.1% used none of the client-side languages it tracks.26

Libraries, collections of prewritten JavaScript, are almost as common. As of October 21, 2026, W3Techs found jQuery on 64.5% of all websites, Bootstrap on 14.6% and React on 6.0%.27

Another 24.6% used none of the libraries W3Techs monitors. Among sites that use a library it can identify, jQuery’s share was 85.5%.27

Developers report a similar picture. Stack Overflow’s 2026 Developer Survey drew 30,903 responses from 169 countries.28

In that survey JavaScript was the most-used language, at 62.0% of respondents, ahead of SQL (58.4%), HTML/CSS (58.2%) and Python (58.0%). TypeScript was sixth, at 43.8%.29

The lead is narrow in some groups. Among 2026 respondents who use AI tools, Python edged out JavaScript, 39% to 38%, and among developers with 16 or more years of experience SQL led, 63% to 62%.28

The 2025 survey, with more than 49,000 responses, had put JavaScript at 66% of all respondents and 68.8% of professional developers.3031

Pages also carry a lot of it. The HTTP Archive’s 2024 Web Almanac, published March 3, 2025, found that the median page loaded 558 KB of JavaScript on mobile and 613 KB on desktop, spread across 22 and 23 requests respectively.32

On the median mobile page, 206 KB of that JavaScript, or 44% of the bytes delivered, went unused during page load.32

Who owns the name

JavaScript is a trademark as well as a language name. The HOPL paper records that Sun Microsystems registered it and licensed it to Netscape and later to the Mozilla Foundation, and that Oracle Corporation now owns the registration.5

MDN’s JavaScript pages carry the same notice, stating that Java and JavaScript are trademarks or registered trademarks of Oracle in the U.S. and other countries.1

On November 22, 2024, Deno, a company that makes a JavaScript runtime, filed a petition with the U.S. Patent and Trademark Office to cancel Oracle’s JavaScript trademark.33

Deno argued that the name has become generic, the everyday name for the language defined by ECMA-262; that Oracle submitted improper evidence when renewing the mark in 2019; and that Oracle had abandoned the mark through non-use.33

The fraud claim centered on the renewal filing: Deno said Oracle had submitted screenshots of the Node.js website as evidence that Oracle itself was using the mark.33

According to Deno, Oracle asked the trademark board on February 3, 2025, to dismiss the fraud part of the petition, while the other claims continued.34 The history of the browser competition that shaped the language is covered in browser wars.

Timeline

  1. ECMAScript 2026, the 17th edition of ECMA-262, is published10
  2. Deno petitions the USPTO to cancel Oracle's JavaScript trademark33
  3. V8 makes Ignition and TurboFan its default pipeline and recognizes Node.js as a first-class embedder17
  4. ECMAScript 2016, the first edition under TC39's yearly release cadence4
  5. ECMAScript 2015 (ES6) adds modules, classes and promises10
  6. ECMAScript 5.1 is published10
  7. ECMAScript 5 is published after the fourth edition is abandoned10
  8. Ryan Dahl releases an early version of Node.js, built on V819
  9. Google releases Chrome and open-sources the V8 JavaScript engine17
  10. TC39 meets in Oslo and agrees on ES3.1 and the Harmony effort12
  11. Jesse James Garrett names the Ajax technique13
  12. ECMA-262 3rd edition (ES3) is published10
  13. Ecma General Assembly adopts the first edition of ECMA-2624
  14. First meeting of Ecma TC39 at Netscape in Mountain View5
  15. Microsoft's Internet Explorer 3.0 beta announces JavaScript support9
  16. Netscape Navigator 2.0 ships with JavaScript 1.05
  17. Netscape and Sun announce the name JavaScript5
  18. The language appears as LiveScript in the first Navigator 2.0 beta5
  19. Brendan Eich writes the Mocha prototype in ten days5

What it means for your website

Almost every website uses JavaScript, including sites made with website builders that never show you a line of code. The practical questions are how much of it your site loads and whether your important content depends on it.

  • Keep scripts light. The median mobile page loads 558 KB of JavaScript, and 44% of it goes unused during page load.32 Each plugin, chat widget, tracking tag or slider can add more, so remove the ones you no longer use.
  • Watch responsiveness. Since March 12, 2024, Google’s Core Web Vitals use Interaction to Next Paint (INP), which measures how quickly a page responds to input; a good score means responding in under 200 milliseconds for at least 75% of visits.35 Long-running scripts slow those responses, because the browser cannot react to a click while a job is still running.24 See Core Web Vitals.
  • Put key content in the HTML. Google renders JavaScript with an up-to-date version of Chromium, but rendering is queued and can take time, and Google still calls server-side rendering or pre-rendering “a great idea.”36 A December 2024 analysis by Vercel found that major AI crawlers, including OpenAI’s GPTBot and Anthropic’s ClaudeBot, did not render JavaScript; Gemini, which uses Google’s crawling infrastructure, was an exception.37 If your prices, services or contact details appear only after scripts run, those crawlers may not see them. See websites and AI search.
  • Load third-party scripts politely. Ask your developer to add async or defer to scripts that do not need to run first, so the browser can keep building the page while they download.21
  • On WordPress. We build on WordPress every week. Its block editor is written with JSX, React’s HTML-like syntax, which needs a build step before browsers can run it, so custom blocks are a developer task rather than a settings change.38 See our WordPress review.

See also

References

  1. JavaScript. MDN Web Docs (Mozilla). accessed October 22, 2026.
  2. What is JavaScript?. MDN Web Docs (Mozilla). accessed October 22, 2026.
  3. Grammar and types. MDN Web Docs (Mozilla). accessed October 22, 2026.
  4. ECMAScript 2026 Language Specification. Ecma International TC39. 2026-06. accessed October 22, 2026.
  5. JavaScript: The First 20 Years (Allen Wirfs-Brock and Brendan Eich), Proc. ACM Program. Lang. 4, HOPL, Article 77. Association for Computing Machinery. 2020-06. accessed October 22, 2026.
  6. United States v. Microsoft, Findings of Fact, section V.H (paragraphs 360 to 377). U.S. Department of Justice. 1999-11-05. accessed October 22, 2026.
  7. Popularity. Brendan Eich (brendaneich.com). 2008-04-03. accessed October 22, 2026.
  8. Netscape and Sun Announce JavaScript, the Open, Cross-Platform Object Scripting Language for Enterprise Networks and the Internet (press release, Internet Archive copy). Netscape Communications and Sun Microsystems. 1995-12-04. accessed October 22, 2026.
  9. Microsoft Internet Explorer 3.0 Beta Now Available. Microsoft. 1996-05-29. accessed October 22, 2026.
  10. ECMA-262: ECMAScript language specification. Ecma International. accessed October 22, 2026.
  11. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format. IETF (RFC Editor). 2017-12. accessed October 22, 2026.
  12. ECMAScript Harmony (Brendan Eich, es-discuss mailing list). esdiscuss.org archive. 2008-08. accessed October 22, 2026.
  13. Ajax: A New Approach to Web Applications (Jesse James Garrett). Adaptive Path (copy hosted by MIT CSAIL). 2005-02-18. accessed October 22, 2026.
  14. Ajax (glossary). MDN Web Docs (Mozilla). accessed October 22, 2026.
  15. Apple Unveils Safari. Apple Newsroom. 2003-01-07. accessed October 22, 2026.
  16. A fresh take on the browser (Sundar Pichai and Linus Upson). Official Google Blog. 2008-09-01. accessed October 22, 2026.
  17. Celebrating 10 years of V8 (Mathias Bynens). V8 project (v8.dev). 2018-09-11. accessed October 22, 2026.
  18. V8 JavaScript engine. V8 project (v8.dev). accessed October 22, 2026.
  19. The Node Ahead: JavaScript leaps from browser into future (Cade Metz). The Register. 2011-03-01. accessed October 22, 2026.
  20. About Node.js. OpenJS Foundation (nodejs.org). accessed October 22, 2026.
  21. <script>: The Script element. MDN Web Docs (Mozilla). accessed October 22, 2026.
  22. The TC39 Process. Ecma TC39. accessed October 22, 2026.
  23. TypeScript: JavaScript with syntax for types. Microsoft (typescriptlang.org). accessed October 22, 2026.
  24. JavaScript execution model. MDN Web Docs (Mozilla). accessed October 22, 2026.
  25. Same-origin policy. MDN Web Docs (Mozilla). accessed October 22, 2026.
  26. Usage statistics of client-side programming languages for websites (as of October 22, 2026). W3Techs. 2026-10-22. accessed October 22, 2026.
  27. Usage statistics of JavaScript libraries for websites (as of October 21, 2026). W3Techs. 2026-10-21. accessed October 22, 2026.
  28. 2026 Stack Overflow Developer Survey. Stack Overflow. 2026. accessed October 22, 2026.
  29. 2026 Stack Overflow Developer Survey: Technology. Stack Overflow. 2026. accessed October 22, 2026.
  30. 2025 Stack Overflow Developer Survey. Stack Overflow. 2025. accessed October 22, 2026.
  31. 2025 Stack Overflow Developer Survey: Technology. Stack Overflow. 2025. accessed October 22, 2026.
  32. Web Almanac 2024: JavaScript. HTTP Archive. 2025-03-03. accessed October 22, 2026.
  33. Deno v. Oracle: Canceling the JavaScript Trademark. Deno. 2024-11-25. accessed October 22, 2026.
  34. Deno v Oracle Update 3: Fighting the JavaScript Trademark. Deno. 2025-03-30. accessed October 22, 2026.
  35. Interaction to Next Paint is officially a Core Web Vital (Rick Viscomi). web.dev (Google). 2024-03-12. accessed October 22, 2026.
  36. Understand the JavaScript SEO basics. Google Search Central. accessed October 22, 2026.
  37. The rise of the AI crawler. Vercel. 2024-12-17. accessed October 22, 2026.
  38. JavaScript in the Block Editor. WordPress Developer Resources. accessed October 22, 2026.

Web Building Encyclopedia. First published October 22, 2026. Last reviewed October 22, 2026. Every fact on this page is linked to a source we opened. Spotted an error? Write to [email protected].