99 Fun Facts About JavaScript
Learn something new, then test yourself with the quiz.
Know these facts? Prove it.
Take the 100-question quizWho created JavaScript in 1995?
Brendan Eich wrote the first version in ten days in May 1995; he went on to co-found the Firefox maker and, in 2015, the Brave browser company.
At which company was JavaScript created in 1995?
Netscape, founded in 1994 by Jim Clark and Mosaic co-author Marc Andreessen, wanted its browser to do more than display static pages and hired a language designer in April 1995 to build a scripting language.
What was the language called when it first shipped in a browser beta in September 1995?
LiveScript was the name in the September 1995 beta of the 2.0 browser; the switch to JavaScript came with the official release that December, borrowing the glow of a hotter language.
JavaScript's creator was originally recruited to embed which existing language in the browser?
Scheme, the minimalist Lisp dialect, was what the new hire had been promised he could put in the browser; management then demanded a more conventional syntax, so only first-class functions and closures survived from the Lisp idea.
In December 1995, which company jointly announced JavaScript with the browser maker in a press release?
Sun Microsystems and the browser maker issued the joint press release on 4 December 1995, with the new name chosen to ride the publicity of Sun's other language; the creator has called it a marketing ploy.
Management wanted the syntax of the new browser scripting language to resemble which language?
Java was the model: management wanted the scripting language to look like Java for a marketing tie-in, so it took the braces and keywords of Java while the semantics underneath owed more to Self and Lisp.
The core language standard is published under which document number?
ECMA-262 is the standard for the language itself, first published in June 1997; ECMA-404 is JSON, ECMA-334 is C#, and ECMA-119 is the ISO 9660 CD-ROM file system.
Ecma International, the standards body behind the language, is based in which city?
Ecma was founded in Geneva in 1961 as the European Computer Manufacturers Association and kept its headquarters there after dropping the acronym to become Ecma International in 1994.
What did Internet Explorer 3.0 call its own implementation of the language in 1996?
JScript was Microsoft's reverse-engineered dialect, shipped in Internet Explorer 3.0 in August 1996 under its own name to sidestep the trademark; the two implementations differed enough to spawn years of 'best viewed in' badges.
Which term did Jesse James Garrett coin in 2005 for loading data in the background without a full page reload?
Ajax, short for Asynchronous JavaScript and XML, was the label in Garrett's February 2005 essay; the XMLHttpRequest object behind it had been built by Microsoft's Outlook Web Access team in the late 1990s.
Chrome shipped in 2008 with which JavaScript engine, faster than anything else at the time?
V8, named after the car engine, was built in Aarhus by a team under Lars Bak and launched with Chrome on 2 September 2008, compiling JavaScript straight to machine code.
Which engine, the first ever written for the language, has powered Firefox since 2004?
Its JIT compilers have been called TraceMonkey, JägerMonkey, IonMonkey and WarpMonkey.
Apple's WebKit began in 2001 as a fork of KHTML and which KDE JavaScript engine?
KJS, the JavaScript engine of KDE's Konqueror browser, was forked alongside KHTML when Lisa Melton started the WebKit project inside Apple on 25 June 2001, chosen over Gecko because the KDE code was small and clean.
Node.js was created in 2009 by whom?
Ryan Dahl wrote Node in 2009, frustrated that thread-per-connection servers such as Apache struggled past 10,000 simultaneous connections; his design used non-blocking I/O with a single thread handling callbacks.
Node's creator later co-created which runtime, announced in a 2018 talk about his regrets?
Deno, an anagram of Node, was unveiled in the 2018 talk '10 Things I Regret About Node.js'; first prototyped in Go, it was rewritten in Rust and sandboxes file and network access behind explicit permissions.
The Bun runtime, unlike Node, uses which JavaScript engine?
JavaScriptCore, the engine from Apple's WebKit, underpins Bun; Jarred Sumner built the runtime in Zig, opened it to the public in July 2022 and shipped version 1.0 in September 2023.
Which package manager was introduced for Node.js in January 2010?
npm was first published in January 2010 and bundled with Node from late 2011; its documentation insists the name is a recursive backronym for 'npm is not an acronym', not 'Node Package Manager'.
In March 2016, the unpublishing of which tiny package broke Babel, webpack and thousands of builds?
left-pad, an 11-line function, vanished when Azer Koçulu unpublished all his modules after the registry sided with the messaging company Kik in a dispute over the name 'kik'; thousands of builds broke until it was restored.
In December 2014 Fedor Indutny forked Node.js over its governance. What was the fork called?
The fork tracked the latest V8 releases and was later merged back, with governance passing to what became the OpenJS Foundation.
Who took over management of Node.js from its founder in January 2012?
Isaac Schlueter, the author of the package manager bundled with Node, ran the project at Joyent from January 2012 until handing it to TJ Fontaine in January 2014; Joyent had built the native Windows port with Microsoft in 2011.
Who created jQuery in January 2006?
John Resig unveiled jQuery at BarCamp NYC in January 2006, influenced by Dean Edwards' cssQuery; its chainable methods and CSS-style selectors made cross-browser DOM scripting bearable.
React was created by Jordan Walke, a software engineer at which company?
Facebook engineer Jordan Walke built the first prototype, FaxJS, and React ran on the News Feed in 2011 and on Instagram in 2012 before being open-sourced.
React was officially open-sourced at a JavaScript conference in which year?
2013 was the year: the library was open-sourced at JSConf US in late May 2013, two years after it first ran on the company's News Feed; React Native followed in 2015.
React Hooks such as useState and useEffect arrived in which version?
16.8, released in February 2019, introduced Hooks after Dan Abramov and Sophie Alpert demonstrated them at React Conf in October 2018; they let function components hold state and side effects.
Vue.js was created by which developer after he had worked at Google with AngularJS?
Evan You, then at Google Creative Lab, began Vue to keep the parts of AngularJS he liked without the weight; it was publicly announced in February 2014 and is pronounced like 'view'.
Svelte, the framework that compiles components away at build time, was created by whom?
Rich Harris released Svelte in November 2016 as the successor to his Ractive.js; its compiler turns components into plain DOM-updating code, so no framework runtime ships to the browser.
Next.js, the React framework with server-side rendering, was created by which company?
Vercel, known as ZEIT when Guillermo Rauch released the first version on GitHub on 25 October 2016, built Next.js to add server rendering and file-based routing to React; the company renamed itself Vercel in 2020.
Which engineer originally developed AngularJS in 2009 for an online JSON storage service?
Miško Hevery and Adam Abrons built it in 2009 for GetAngular, a JSON storage service, before Hevery brought it into Google; long-term support for AngularJS ended on 31 December 2021, after the ground-up rewrite Angular had replaced it.
Ember.js got its name in December 2011 when which framework's 2.0 version was renamed?
SproutCore 2.0, the rewrite Yehuda Katz and Tom Dale led, was renamed Ember.js in December 2011 because it had diverged so far from the original framework; Katz later sat on TC39, the committee that steers the language.
CoffeeScript, Backbone.js and Underscore.js were all created by which developer?
Jeremy Ashkenas made his first CoffeeScript commit on 13 December 2009, labelled 'initial commit of the mystery language', having released Underscore.js earlier that year; Backbone.js followed in October 2010.
What does the D3 in D3.js stand for?
Data-Driven Documents is the name: Mike Bostock, Jeff Heer and Vadim Ogievetsky released D3 in 2011 as the successor to their Protovis framework, binding data to DOM elements and driving them with web standards.
Which developer, known online as Mr.doob, first released the 3D library Three.js on GitHub in 2010?
Ricardo Cabello, the Spanish developer known as Mr.doob, had written the library in ActionScript for Flash before porting it to JavaScript in 2009 and publishing it on GitHub in April 2010.
Electron, the desktop framework behind VS Code, Slack and Discord, was originally built for which editor?
Atom, GitHub's editor, was the original host: Cheng Zhao built Atom Shell for it, and it was renamed Electron in April 2015; it pairs a Chromium renderer with a Node.js back end.
Which creator of Turbo Pascal and C# led Microsoft's TypeScript project?
TypeScript shipped publicly as version 0.8 in October 2012; in 2025 Microsoft announced a port of the compiler to Go for version 7.
What does the strict equality operator === check that == does not?
That both operands have the same type is the extra check: === compares without type coercion, so 1 === '1' is false while 1 == '1' is true, because == first converts the operands to a common type.
Who specified the JSON format and, with Chip Morningstar, sent the first JSON message in April 2001?
Douglas Crockford published the json.org specification in 2002 after that April 2001 message at State Software; he also wrote JavaScript: The Good Parts, JSLint and JSMin.
Why did JSON's designer say he deliberately left comments out of the format?
People were using them to hold parsing directives, the designer explained, 'a practice which would have destroyed interoperability'; JSON also forbids trailing commas and single-quoted strings.
Which portable binary format, a W3C recommendation since 2019, lets C, C++ and Rust run in browsers?
WebAssembly, first announced in 2015 and shipped in all four major browsers by 2017, became a W3C recommendation in December 2019; compilers such as Emscripten target it from C, C++ and Rust.
asm.js, the strict JavaScript subset compiled ahead of time, was started at which organisation?
Mozilla researchers including Alon Zakai, the Emscripten author, defined asm.js; Firefox 22 shipped the OdinMonkey module that compiled the subset ahead of time, and the same team then helped design its binary successor.
Which company took over the 'JavaScript' US trademark in 2010?
Oracle inherited the mark when its purchase of the language's original trademark holder closed in January 2010; the language's creator and thousands of developers signed a 2024 open letter asking Oracle to release it, and a cancellation petition followed.
Which JavaScript interpreter shipped inside JDK 8, alongside the jjs command-line tool?
Nashorn, German for rhinoceros after its predecessor Rhino, shipped with JDK 8 in March 2014; deprecated in JDK 11 and removed in JDK 15, it gave way to GraalJS, which lets JavaScript create and call JVM objects.
Block-scoped let and const were added in which edition of the language?
ES6 (2015) introduced let and const with block scope; before that, var gave only function scoping and developers faked blocks with immediately-invoked function expressions.
Which object, added in ES2015, lets code intercept property reads and writes on another object?
Proxy objects, introduced in ES2015, wrap a target with handler traps such as get and set that run on every property access; the companion Reflect object supplies the default behaviour for each trap.
Since ES6, how often is a new edition of the language standard finalised?
Annually, each June, the Ecma General Assembly approves the new edition, a snapshot of the draft maintained openly on GitHub by TC39; ES2016 was the first of the yearly releases.
Which JavaScript value is not equal to itself?
NaN, short for Not a Number, is the only JavaScript value for which x === x is false, exactly as the floating-point standard requires; Number.isNaN exists because of that.
Which of these values is truthy in JavaScript?
Only 0, -0, null, NaN, undefined and the empty string are falsy; every non-empty string and every object is truthy.
Template literals with embedded ${expression} syntax are delimited by which character?
The backtick (`) delimits template literals; they can span multiple lines, interpolate ${expression} values and feed tagged template functions, which receive the literal's pieces and values separately.
How are ordinary JavaScript numbers represented in memory?
IEEE 754 double-precision floats hold every ordinary number, which is why 0.1 + 0.2 gives 0.30000000000000004 and integers are exact only up to 2^53 - 1; Infinity and its negative are numbers too.
Which primitive type, written with a trailing n, holds integers of any size?
BigInt, added in ES2020, stores integers of arbitrary size, written like 9007199254740993n; ordinary numbers are exact only between Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER, and the two types cannot be mixed in arithmetic.
Implementing which built-in key makes an object iterable with for...of and the spread operator?
Symbol.iterator is the well-known symbol whose method returns an iterator; arrays, strings, Maps and Sets implement it, and any object that does can be spread or looped with for...of. Symbols are guaranteed unique, which also suits hidden properties.
A JavaScript Date object stores a millisecond count from midnight UT on which date?
1 January 1970 at midnight UTC is the epoch, so Date.now() returns milliseconds since then; the range is about plus or minus 100 million days, which comfortably covers recorded history.
Automatic insertion of which punctuation mark lets JavaScript programmers omit statement terminators?
The semicolon is inserted automatically at line ends where the grammar requires one, but a line starting with ( or [ can be joined to the previous statement, which is why many style guides require typing semicolons.
The with statement is not allowed once a script opts into what?
Strict mode, enabled by the 'use strict' directive or automatically inside modules and classes, bans the with statement and refuses assignments to undeclared variables, which used to silently create globals.
A JavaScript identifier may begin with a letter, an underscore, or which other character?
The dollar sign is a valid identifier start, which is why jQuery's whole API hangs off $(); identifiers may also begin with an underscore or any Unicode letter, but never with a digit.
JavaScript's object model does inheritance through what, rather than classes?
Prototypes are the mechanism: each object holds a link to another object from which it inherits properties, an idea popularised by the Self language of David Ungar and Randall Smith; the later class syntax is sugar over the same chain.
Which mechanism processes JavaScript's message queue one task at a time?
The event loop takes one message at a time from the queue and runs its callback to completion before looking at the next, which is why a long-running task freezes the page.
Which method turns a JavaScript value into a JSON string?
JSON.stringify converts a value to JSON text, dropping functions and undefined properties and calling any toJSON method it finds; its optional second and third arguments filter keys and set indentation.
Node.js was first demonstrated in November 2009 at the inaugural European edition of which conference?
JSConf EU, held in Berlin for the first time in November 2009, hosted the first public demo of Node, showing a non-blocking server handling thousands of connections on a single thread.
A July 2008 conference in which city brought the feuding JavaScript factions together, leading to ECMAScript 5?
Oslo hosted the TC39 meeting in July 2008 where the ES4 and ES3.1 camps agreed on 'Harmony', announced that August: the ambitious fourth edition was dropped and ES3.1 became ES5 in December 2009.
Which JavaScript value makes the typeof operator report "object", a bug kept since the language's first version?
null reports "object" because the first JavaScript engine tagged objects with zeros and stored null as an all-zero pointer. A fix was later proposed and rejected, so the quirk stayed.
The first version of JavaScript was famously completed in 1995, to meet a browser beta deadline, in roughly how long?
Ten days was all the browser's release schedule allowed. A typeof bug from that first implementation is still in the language today.
The JavaScript data type with just two possible values is named after which nineteenth-century English mathematician?
George Boole set out his algebra of logic in the mid-1800s, long before computers existed. His two-valued system now decides every if statement a program runs.
JavaScript's + operator both adds and joins, so what does the expression "2" + 2 evaluate to?
The string "22" appears because + joins as soon as either side is text, converting the other side to match. Subtraction has no such second job, so "2" - 2 gives 0.
What does the comparison 0.1 + 0.2 === 0.3 evaluate to in JavaScript, a famous trap for beginners?
false is the result because 0.1 and 0.2 have no exact binary form, so their sum comes out as 0.30000000000000004.
Which month does JavaScript's Date method getMonth report as the number 9, to the surprise of many beginners?
October is month 9 because getMonth numbers the months 0 to 11, which makes the result handy as an index into an array of month names.
Before being renamed twice during 1995, the language now known as JavaScript first went by which name?
Mocha was the language's very first name, and both renamings came before the end of 1995. Mocha is now also the name of a JavaScript test framework.
Which nickname do developers give plain JavaScript written without any libraries or frameworks at all?
Vanilla JS borrows the ice-cream sense of plain and unadorned. A spoof website even markets it as the most lightweight framework available anywhere.
What does the abbreviation JSON stand for, the text data format that nearly took the name JSML instead?
JavaScript Object Notation beat JSML, JavaScript Markup Language, in a vote by the startup founders who named it. Despite the name, the format is language-independent and used far beyond JavaScript.
Rather than throwing an error, JavaScript returns which special value when a positive number is divided by zero?
Infinity is an ordinary number value in JavaScript, so the calculation carries on instead of crashing. Dividing a negative number by zero gives -Infinity.
In a JavaScript file, which characters turn the rest of a line into a comment that the engine ignores?
Two forward slashes begin a line comment that ends where the line does. Longer notes sit between /* and */ instead and can run across several lines.
In JavaScript, what job does a single equals sign perform, in contrast to the doubled and tripled versions?
Assignment copies the value written after the sign into the variable named before it. The operation hands that value back as its own result, so several can be chained, as in a = b = 5.
Which pair of characters encloses a JavaScript array literal, such as a list of three numbers?
Square brackets wrap an array literal, with commas between the items. The same characters read an item back by its position, counting from zero.
Which property reports how many elements a JavaScript array contains, and also works on strings?
length keeps itself up to date as an array grows, and it can be written as well as read: setting it to a smaller number deletes the elements beyond that point.
Which character, placed before a JavaScript expression, acts as logical NOT and inverts its truth value?
An exclamation mark turns a truthy value into its opposite. Doubling it, as in !!value, is a common shortcut for forcing any value into a plain yes-or-no.
Which JavaScript operator gives the leftover after a division, so that placing it between 7 and 2 yields 1?
% is the remainder operator, and its result always takes the sign of the dividend, so -7 % 2 gives -1. In Python the same character follows the divisor instead.
Which JavaScript construct, written with a question mark and a colon, is a compact alternative to if...else?
The ternary operator is the only one in JavaScript that takes three parts: a condition, a result if the condition is met and a result if it is not.
In a JavaScript switch statement, which keyword stops execution from falling through into the next case clause?
break ends the switch at that point. Leave it out and execution runs straight on into the following case, even when that case's value does not match.
Which JavaScript looping statement always runs its body at least once because the condition is tested afterwards?
A do...while loop checks its condition only after each pass, so the body runs even when the condition is untrue from the start. A plain while loop may never run at all.
JavaScript strings are sequences of code units in which Unicode encoding, the reason an emoji can count as two?
UTF-16 fits most characters into a single 16-bit unit but needs a pair of them, known as surrogates, for emoji and other rarer characters.
Which JavaScript array method adds new elements to the end of an array and is reversed by calling pop?
push adds to the end and hands back the array's new size, and its counterpart unshift does the same job at the front.
Which JavaScript array method returns a new array containing the result of calling a function on every element?
map builds a fresh array the same size as the original and leaves the original untouched, which makes it the standard way to transform a list.
Which JavaScript array method can delete, replace or insert elements at any position, changing the array in place?
splice rewrites the very array it is called on. A newer sibling, toSpliced, returns an altered copy and leaves the original alone.
What does JavaScript's indexOf method return when the element being searched for is not in the array?
The value -1 signals a miss because 0 is a real position, the opening slot of the array. The newer includes method answers the same question with a plain yes or no.
With no compare function supplied, what does JavaScript's sort method turn the array [10, 9, 1] into?
[1, 10, 9] is the result because the default sort converts every element to text and compares character by character, so "10" lands ahead of "9".
Given plain text rather than a regular expression, JavaScript's replace method changes which of the matches it finds?
Only the first match is swapped unless the pattern is a regular expression carrying the g flag. The replaceAll method was added later to change every match in one call.
Which global JavaScript function reads the text "42px" and returns the number 42, ignoring the trailing letters?
parseInt reads digits from the front of the text and stops at the earliest character that is not a numeral. Number is fussier and rejects "42px" outright.
Which built-in JavaScript method turns the text "a,b,c" into an array of three items when passed a comma?
split cuts a string wherever the separator appears and returns the pieces as an array. The array method join is its mirror image and glues the pieces back together.
Which built-in JavaScript method strips whitespace from both ends of a piece of text, handy for tidying form input?
trim returns a new string with the whitespace gone from both ends and leaves the original unchanged. Its relatives trimStart and trimEnd tidy just one side.
What does the abbreviation DOM stand for, the tree of nodes that JavaScript uses to change a web page?
Document Object Model describes the page as a tree in which every element, attribute and piece of text is a node that code can read or rewrite.
Which built-in JavaScript function runs a piece of code once, after a delay given in milliseconds?
setTimeout fires just once when its timer runs out, whereas setInterval keeps repeating. The delay is only a minimum, because the code has to wait if the page is busy.
Which JavaScript keyword pairs with try to deal with an exception thrown inside the protected block?
catch receives the thrown exception so the program can respond instead of stopping. An optional finally block then runs whether or not anything went wrong.
Which built-in function lets JavaScript show a dialog box with a text field and return what the user enters?
prompt pauses the script until the visitor submits or cancels the box. Its siblings alert and confirm offer no text field, only a message and buttons.
What name do JavaScript developers give to a click travelling outwards from a button to fire its ancestors' handlers?
Event bubbling carries the click outwards from the innermost element to each ancestor in turn. A handler can halt the trip by calling stopPropagation.
Which attribute of the HTML script tag makes the browser run a JavaScript file only after the page has been parsed?
defer fetches the file in the background and runs it once parsing is finished, keeping scripts in the order they appear. Its cousin async runs each one as soon as it arrives.
Which JavaScript statement pauses execution at that line whenever the browser's developer tools are open?
debugger behaves like a breakpoint written straight into the code. When no debugging tool is attached, the statement does nothing at all.
Microsoft's original Edge browser ran on which home-grown JavaScript engine, retired after Edge moved to Chromium?
Chakra had its code made public in 2016 under the name ChakraCore, but Microsoft ended support for it in 2021 once Edge had switched to a Chromium-based engine.
The JavaScript engine Rhino took its name from the animal on the cover of a JavaScript book from which publisher?
O'Reilly Media is known for the animal woodcuts on many of its covers, and the one on its JavaScript guide is a rhinoceros.
Which method of a JavaScript event object cancels the browser's built-in response, such as following a clicked link?
preventDefault only switches off the browser's own reaction, such as opening a link or pasting text. The event itself carries on travelling through the page as usual.
Which built-in call lets JavaScript developers print a debugging message to the browser's developer tools panel?
console.log writes to the developer tools instead of the page, so ordinary visitors never see the message.
Think you know JavaScript?
Put these facts to the test with the interactive quiz.
Take the 100-question quizTeaching JavaScript?
Make a custom quiz — handy for classrooms and study groups.
Make a quiz on anything