Skip to content

Instantly share code, notes, and snippets.

@simevidas
Created June 7, 2020 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simevidas/6d6dd14b13fb6cf648f0b4cb4884e176 to your computer and use it in GitHub Desktop.
Save simevidas/6d6dd14b13fb6cf648f0b4cb4884e176 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head prefix="og: http://ogp.me/ns#">
<link rel="preconnect" href="https://interactive-examples.mdn.mozilla.net" pr="0.75" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<script>(function(d) { d.className = d.className.replace(/\bno-js/, ''); })(document.documentElement);</script>
<title>JavaScript | MDN</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<link rel="preload" href="/static/fonts/locales/ZillaSlab-Regular.subset.bbc33fb47cf6.woff2" as="font" type="font/woff2"
crossorigin />
<link rel="preload" href="/static/fonts/locales/ZillaSlab-Bold.subset.e96c15f68c68.woff2" as="font" type="font/woff2"
crossorigin />
<link rel="home" href="/en-US/">
<link rel="license" href="#license">
<link href="/static/build/styles/react-header.9d54d821fd71.css" rel="stylesheet" type="text/css" />
<link href="/static/build/styles/auth-modal.be43f0f58a73.css" rel="stylesheet" type="text/css" />
<link href="/static/build/styles/react-mdn.aba347b85fb3.css" rel="stylesheet" type="text/css" />
<link href="/static/build/styles/subscriptions.4182fa9e89f2.css" rel="stylesheet" type="text/css" />
<link href="/static/build/styles/prism.a6f275e5032b.css" rel="stylesheet" type="text/css" />
<style>
@font-face {
font-family: zillaslab;
font-display: swap;
src: url(/static/fonts/locales/ZillaSlab-Regular.subset.bbc33fb47cf6.woff2) format('woff2'),
url(/static/fonts/locales/ZillaSlab-Regular.subset.0357f12613a7.woff) format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: zillaslab;
font-display: swap;
src: url(/static/fonts/locales/ZillaSlab-Bold.subset.e96c15f68c68.woff2) format('woff2'),
url(/static/fonts/locales/ZillaSlab-Bold.subset.da0ccde4ca4a.woff) format('woff');
font-weight: bold;
font-style: normal;
}
</style>
<script>
// Mozilla DNT Helper
/* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ if(typeof Mozilla==='undefined'){var Mozilla={}}Mozilla.dntEnabled=function(dnt,ua){'use strict';var dntStatus=dnt||navigator.doNotTrack||window.doNotTrack||navigator.msDoNotTrack;var userAgent=ua||navigator.userAgent;var anomalousWinVersions=['Windows NT 6.1','Windows NT 6.2','Windows NT 6.3'];var fxMatch=userAgent.match(/Firefox\/(\d+)/);var ieRegEx=/MSIE|Trident/i;var isIE=ieRegEx.test(userAgent);var platform=userAgent.match(/Windows.+?(?=;)/g);if(isIE&&typeof Array.prototype.indexOf!=='function'){return false}else if(fxMatch&&parseInt(fxMatch[1],10)<32){dntStatus='Unspecified'}else if(isIE&&platform&&anomalousWinVersions.indexOf(platform.toString())!==-1){dntStatus='Unspecified'}else{dntStatus={'0':'Disabled','1':'Enabled'}[dntStatus]||'Unspecified'}return dntStatus==='Enabled'?true:false};
// only load GA if DNT is not enabled
if (Mozilla && !Mozilla.dntEnabled()) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-36116321-5', 'mozilla.org');
ga('set', 'anonymizeIp', true);
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script>
LUX=(function(){var a=("undefined"!==typeof(LUX)&&"undefined"!==typeof(LUX.gaMarks)?LUX.gaMarks:[]);var d=("undefined"!==typeof(LUX)&&"undefined"!==typeof(LUX.gaMeasures)?LUX.gaMeasures:[]);var j="LUX_start";var k=window.performance;var l=("undefined"!==typeof(LUX)&&LUX.ns?LUX.ns:(Date.now?Date.now():+(new Date())));if(k&&k.timing&&k.timing.navigationStart){l=k.timing.navigationStart}function f(){if(k&&k.now){return k.now()}var o=Date.now?Date.now():+(new Date());return o-l}function b(n){if(k){if(k.mark){return k.mark(n)}else{if(k.webkitMark){return k.webkitMark(n)}}}a.push({name:n,entryType:"mark",startTime:f(),duration:0});return}function m(p,t,n){if("undefined"===typeof(t)&&h(j)){t=j}if(k){if(k.measure){if(t){if(n){return k.measure(p,t,n)}else{return k.measure(p,t)}}else{return k.measure(p)}}else{if(k.webkitMeasure){return k.webkitMeasure(p,t,n)}}}var r=0,o=f();if(t){var s=h(t);if(s){r=s.startTime}else{if(k&&k.timing&&k.timing[t]){r=k.timing[t]-k.timing.navigationStart}else{return}}}if(n){var q=h(n);if(q){o=q.startTime}else{if(k&&k.timing&&k.timing[n]){o=k.timing[n]-k.timing.navigationStart}else{return}}}d.push({name:p,entryType:"measure",startTime:r,duration:(o-r)});return}function h(n){return c(n,g())}function c(p,o){for(i=o.length-1;i>=0;i--){var n=o[i];if(p===n.name){return n}}return undefined}function g(){if(k){if(k.getEntriesByType){return k.getEntriesByType("mark")}else{if(k.webkitGetEntriesByType){return k.webkitGetEntriesByType("mark")}}}return a}return{mark:b,measure:m,gaMarks:a,gaMeasures:d}})();LUX.ns=(Date.now?Date.now():+(new Date()));LUX.ac=[];LUX.cmd=function(a){LUX.ac.push(a)};LUX.init=function(){LUX.cmd(["init"])};LUX.send=function(){LUX.cmd(["send"])};LUX.addData=function(a,b){LUX.cmd(["addData",a,b])};LUX_ae=[];window.addEventListener("error",function(a){LUX_ae.push(a)});LUX_al=[];if("function"===typeof(PerformanceObserver)){var LongTaskObserver=new PerformanceObserver(function(c){var b=c.getEntries();for(var a=0;a<b.length;a++){var d=b[a];LUX_al.push(d)}});try{LongTaskObserver.observe({entryTypes:["longtask"],buffered:true})}catch(e){}};
</script>
<script src="https://cdn.speedcurve.com/js/lux.js?id=108906238" async defer crossorigin="anonymous"></script>
<script>
window.fetch || document.write('<script src="/static/build/js/fetch-polyfill.63fdc379c7eb.js"><\/script>');
</script>
<script>
// Only include the fat polyfill for browsers that seem to not have
// certain JS features. E.g. Firefox 38.
Array.prototype.includes || document.write('<script src="/static/build/js/js-polyfill.6f2e22100487.js"><\/script>');
</script>
<script async type="text/javascript" src="/static/build/js/perf.654b849a6fd9.js" charset="utf-8"></script>
<!-- common social tags -->
<meta property="og:type" content="website">
<meta property="og:image" content="https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png">
<meta property="og:site_name" content="MDN Web Docs">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png">
<meta name="twitter:site" content="@MozDevNet">
<meta name="twitter:creator" content="@MozDevNet">
<link rel="search" type="application/opensearchdescription+xml" href="https://developer.mozilla.org/en-US/search/xml" title="MDN Web Docs">
<!-- third-generation iPad with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/favicon144.e7e21ca263ca.png">
<!-- iPhone with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/favicon114.d526f38b09c5.png">
<!-- first- and second-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/favicon72.cc65d1d762a0.png">
<!-- non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="/static/img/favicon57.de33179910ae.png">
<!-- basic favicon -->
<link rel="shortcut icon" href="/static/img/favicon32.7f3da72dcea1.png">
<link href="/static/build/styles/banners.e6cd46767c2e.css" rel="stylesheet" type="text/css" />
<link href="/static/build/styles/mdn-subscriptions.dbb82432d74c.css" rel="stylesheet" type="text/css" />
<link rel="canonical" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" >
<link rel="alternate" hreflang="en" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="ar" href="https://developer.mozilla.org/ar/docs/Web/JavaScript" title="جافاسكربت">
<link rel="alternate" hreflang="bg" href="https://developer.mozilla.org/bg/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="bn" href="https://developer.mozilla.org/bn/docs/Web/JavaScript" title="জাভাস্ক্রিপ্ট">
<link rel="alternate" hreflang="ca" href="https://developer.mozilla.org/ca/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="de" href="https://developer.mozilla.org/de/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="el" href="https://developer.mozilla.org/el/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="es" href="https://developer.mozilla.org/es/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="fa" href="https://developer.mozilla.org/fa/docs/Web/JavaScript" title="جاوا اسکریپت">
<link rel="alternate" hreflang="fi" href="https://developer.mozilla.org/fi/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="fr" href="https://developer.mozilla.org/fr/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="he" href="https://developer.mozilla.org/he/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="hi" href="https://developer.mozilla.org/hi-IN/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="hu" href="https://developer.mozilla.org/hu/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="id" href="https://developer.mozilla.org/id/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="it" href="https://developer.mozilla.org/it/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="ja" href="https://developer.mozilla.org/ja/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="kab" href="https://developer.mozilla.org/kab/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="ko" href="https://developer.mozilla.org/ko/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="my" href="https://developer.mozilla.org/my/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="nl" href="https://developer.mozilla.org/nl/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="pl" href="https://developer.mozilla.org/pl/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="pt-BR" href="https://developer.mozilla.org/pt-BR/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="pt" href="https://developer.mozilla.org/pt-PT/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="ru" href="https://developer.mozilla.org/ru/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="sv" href="https://developer.mozilla.org/sv-SE/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="th" href="https://developer.mozilla.org/th/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="tr" href="https://developer.mozilla.org/tr/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="uk" href="https://developer.mozilla.org/uk/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="vi" href="https://developer.mozilla.org/vi/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="zh" href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript" title="JavaScript">
<link rel="alternate" hreflang="zh-TW" href="https://developer.mozilla.org/zh-TW/docs/Web/JavaScript" title="JavaScript">
<!-- document-specific social tags -->
<meta property="og:title" content="JavaScript">
<meta property="og:url" content="https://developer.mozilla.org/en-US/docs/Web/JavaScript">
<meta name="twitter:url" content="https://developer.mozilla.org/en-US/docs/Web/JavaScript">
<meta name="twitter:title" content="JavaScript">
<meta property="og:description" content="JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.">
<meta name="description" content="JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.">
<meta name="twitter:description" content="JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.">
<link href="/static/build/styles/print.ca192a439743.css" rel="stylesheet" type="text/css" media="print" />
</head>
<body>
<script>
// make sure global mdn object exists
var mdn = window.mdn || {};
(function(win) {
'use strict';
win.mdn.features = {};
win.mdn.stripePublicKey = 'pk_live_GZl4tCi8J5mWhKbJeRey4DSy';
win.mdn.contributionSupportEmail = 'mdn-support@mozilla.com';
win.mdn.siteUrl = 'https://developer.mozilla.org';
win.mdn.wikiSiteUrl = 'https://wiki.developer.mozilla.org';
win.mdn.staticPath = '/static/';
win.mdn.wiki = {
autosuggestTitleUrl: '/en-US/docs/get-documents'
};
win.mdn.notifications = [];
// interactive editor config
win.mdn.interactiveEditor = {
siteUrl: "https://developer.mozilla.org",
editorUrl: "https://interactive-examples.mdn.mozilla.net"
};
win.mdn.langCookieName = "django_language";
})(this);
</script>
<div id="react-container" data-component-name="SPA"><div class="loading-bar"></div><ul id="nav-access" data-testid="a11y-nav"><li><a id="skip-main" href="#content">Skip to main content</a></li><li><a id="skip-language" href="#language">Select language</a></li><li><a id="skip-search" href="#main-q">Skip to search</a></li></ul><header class="page-header" data-testid="header"><a href="/en-US/" class="logo" aria-label="MDN Web Docs"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 219 48" role="img"><path d="M49.752 30.824h59.917v17.132H49.75zm57.23 12.3c-.103.03-.21.048-.316.05-.338 0-.514-.15-.514-.582v-3.256c0-1.71-1.352-2.543-2.976-2.543a7.206 7.206 0 00-3.21.676l-.29 1.724 1.71.182.245-.842a2.338 2.338 0 011.147-.216c1.214 0 1.23.913 1.23 1.69v.234c-.407-.048-.818-.07-1.23-.068-1.71 0-3.49.433-3.49 2.276 0 1.563 1.23 2.144 2.31 2.144a2.7 2.7 0 002.41-1.494c.018.88.77 1.563 1.648 1.494a2.89 2.89 0 001.353-.338zm-4.604-.05a.787.787 0 01-.88-.867c0-.815.677-1.015 1.432-1.015.36.008.722.04 1.078.098-.05 1.235-.852 1.783-1.63 1.783zM97.388 33l-3.24 11.433h2.11L99.5 33.002zm-4.353 0l-3.24 11.433h2.11L95.145 33zm-6.89 6.645h2.243V36.94h-2.242zm0 4.802h2.243v-2.706h-2.242zm-3.617-1.64H80.1l4.156-4.736-.166-1.13h-6.58l-.268 2.63 1.546.164.338-1.163h2.343l-4.123 4.734.216 1.13h6.544l.467-2.63-1.69-.164zM72.143 36.79c-2.706 0-4.02 1.812-4.02 4.004 0 2.394 1.595 3.804 3.905 3.804 2.394 0 4.122-1.51 4.122-3.905-.003-2.093-1.32-3.906-4.01-3.906zm-.054 6.154c-1.165 0-1.763-.997-1.763-2.292 0-1.414.676-2.23 1.778-2.23 1.015 0 1.83.677 1.83 2.196 0 1.438-.73 2.327-1.846 2.327zm-5.906-3.564c0-1.78-1.224-2.594-2.577-2.594a2.51 2.51 0 00-2.44 1.612c-.367-1.1-1.364-1.613-2.443-1.613a2.48 2.48 0 00-2.276 1.278v-1.13h-3.14v1.63h.996v4.24h-.997v1.63h4.572v-1.63h-1.432V40.2c0-1.048.433-1.78 1.448-1.78.845 0 1.278.502 1.278 1.797v4.224h3.14v-1.63h-.996v-2.612c0-1.048.433-1.78 1.447-1.78.846 0 1.278.502 1.278 1.797v4.214h3.142V42.8h-.998zm78.791-22.39h-6.29c.23-1.935 1.16-3.558 3.274-3.558 2.245 0 3.2 1.857 3.016 3.558zM218.952 0v29.137h-169.2V0zM71.706 6.885h-3.85L61.51 20.01h-.104L54.882 6.884h-3.84v1.65h2.19V21.98H51.12v1.65h5.927v-1.65h-2.012V11.24h.1l5.75 11.553H61.9l5.62-11.474h.105v10.66h-1.962v1.65h5.942v-1.65h-2.09V8.536h2.19zm9.993 16.76c5.285 0 8.484-3.48 8.484-8.42 0-4.847-3.094-8.353-8.56-8.353H74.12v1.623h2.114v13.527H74.12v1.623zm27.05-16.76h-6.426v1.65h2.526v11.268h-.1L95.21 6.885H91.6v1.65h2.22V21.98h-1.935v1.65h6.385v-1.65h-2.655V10.444h.1l9.724 13.202h1.21V8.535h2.09zm26.71 5.29h-5.156v1.467h1.83l-1.857 7.247h-.128l-3.586-8.716h-1.21l-3.423 8.718h-.127l-2.14-7.247h1.933v-1.47h-5.41v1.467h1.522l3.25 10.003h1.352l3.432-8.766h.13l3.496 8.765h1.393l3.122-10.003h1.573zm6.704 11.727c2.837 0 4.514-1.583 4.83-3.568l-1.523-.338c-.36 1.42-1.365 2.347-3.17 2.347-2.283 0-3.53-1.468-3.636-4.02h8.058c.1-.445.153-.898.156-1.354-.024-2.71-1.728-5.03-4.873-5.03-3.246 0-5.26 2.58-5.26 6.14 0 3.712 2.162 5.825 5.412 5.825zm13.408 0c3.663 0 5.134-3.25 5.134-6.294 0-3.642-2.063-5.67-4.924-5.67-2.19 0-3.402 1.186-4.1 2.603V5.905h-3.53v1.47h1.692v12.923a22.8 22.8 0 01-.338 3.35h1.805a44.05 44.05 0 00.235-1.906c.747 1.39 2.242 2.165 4.02 2.165zm26.198-1.728h-1.985V5.904h-4.6v1.47h2.798v6.653c-.748-1.342-2.15-2.09-3.842-2.09-3.74 0-5.183 3.2-5.183 6.267 0 3.584 1.958 5.698 4.924 5.698 2.087 0 3.352-1.224 4.1-2.577v2.323h3.784zm6.963 1.728c3.53 0 5.75-2.526 5.742-6.006 0-3.25-1.934-5.982-5.647-5.982s-5.67 2.735-5.67 6.087c0 3.457 2.09 5.905 5.568 5.905zm12.942 0c3.172 0 4.538-2.114 4.866-4.112l-1.548-.34c-.334 1.885-1.315 2.917-3.094 2.917-2.27 0-3.507-1.637-3.507-4.397 0-2.475.982-4.487 3.43-4.487a4.4 4.4 0 012.45.646l.42 1.936 1.496-.18-.44-2.758c-1.16-.876-2.397-1.187-3.92-1.187-3.556 0-5.362 2.966-5.362 6.14 0 3.685 2.036 5.825 5.208 5.825zm11.166 0c2.76 0 4.874-1.34 4.847-3.595 0-4.565-7.1-2.195-7.1-5.184 0-1.177 1.03-1.69 2.474-1.69.826-.015 1.64.18 2.368.567l.267 1.864 1.495-.18-.284-2.68a8.135 8.135 0 00-3.997-1.06c-2.088 0-4.255.903-4.255 3.328 0 4.46 7.193 2.063 7.193 5.208 0 1.315-1.495 1.934-3.095 1.934a5.812 5.812 0 01-2.553-.568l.078-1.522-1.444-.156-.362 2.604c.977.643 2.736 1.133 4.36 1.133zm-54.042-6.11c0 2.373-1.058 4.564-3.584 4.564a3.455 3.455 0 01-3.534-3.456v-1.728c.05-1.7 1.444-3.686 3.635-3.686 1.948 0 3.48 1.444 3.483 4.305zm19.18-1.06v1.833c-.076 1.73-1.57 3.79-3.634 3.79-1.985 0-3.48-1.47-3.48-4.28 0-2.425 1.133-4.59 3.686-4.59a3.36 3.36 0 013.43 3.248zm14.597 1.133c0 2.58-1.34 4.488-3.79 4.488-2.453 0-3.74-1.958-3.74-4.46 0-2.55 1.34-4.434 3.74-4.434 2.397 0 3.79 1.778 3.79 4.405zm-104.39-2.593c0 4.16-2.32 6.763-6.574 6.763h-3.478V8.508h3.466c4.254 0 6.574 2.71 6.587 6.764zM.116 0h47.956v47.956H.116zM42.01 22.02c-.036-.723-.12-1.448-.17-2.166a1.74 1.74 0 00-.395-.98 2.465 2.465 0 00-1.026-.74c-.808-.314-1.622-.664-2.435-.975a21.509 21.509 0 01-3.342-1.472 2.626 2.626 0 01-1.296-1.972 2.954 2.954 0 00-1.47-2.228 4.062 4.062 0 00-2.958-.35c-.734.176-1.5.165-2.23-.033l-1.112-.34-.302-.09-.873-.26c-1.57-.468-2.228-.713-4.773-.278a14.678 14.678 0 00-7.09 3.897l-6.37 6.76h5.72l-3.504 3.71h6.026l-3.503 3.71h4.844l-1.548 4.06c5.93 6.07 12.25 7.295 12.25 7.295 0-1.673.38-8.24.826-9.34a5.25 5.25 0 01.762-1.54 4.211 4.211 0 013.393-1.547c1.303 0 2.597.238 3.815.702.74.31 1.577.264 2.277-.122a38.42 38.42 0 001.498-.94.839.839 0 01.556-.18c.54.06 1.054-.237 1.27-.734.16-.33.35-.64.524-.97.472-.884.69-1.88.633-2.88z"></path></svg></a><nav class="main-nav" aria-label="Main menu"><button type="button" class="ghost main-menu-toggle" aria-haspopup="true" aria-label="Show Menu"></button><ul class="main-menu "><li class="top-level-entry-container"><button type="button" class="top-level-entry" aria-haspopup="true">Technologies</button><ul aria-expanded="false"><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web">Technologies Overview</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/HTML">HTML</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/CSS">CSS</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/JavaScript">JavaScript</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/Guide/Graphics">Graphics</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/HTTP">HTTP</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/API">APIs / DOM</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions">Browser Extensions</a></li><li data-item="Technologies" role="menuitem"><a href="/en-US/docs/Web/MathML">MathML</a></li></ul></li><li class="top-level-entry-container"><button type="button" class="top-level-entry" aria-haspopup="true">References &amp; Guides</button><ul aria-expanded="false"><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Learn">Learn web development</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Web/Tutorials">Tutorials</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Web/Reference">References</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Web/Guide">Developer Guides</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Web/Accessibility">Accessibility</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Games">Game development</a></li><li data-item="References &amp; Guides" role="menuitem"><a href="/en-US/docs/Web">...more docs</a></li></ul></li><li class="top-level-entry-container"><button type="button" class="top-level-entry" aria-haspopup="true">Feedback</button><ul aria-expanded="false"><li data-item="Feedback" role="menuitem"><a href="/en-US/docs/MDN/Feedback">Send Feedback</a></li><li data-item="Feedback" role="menuitem"><a target="_blank" rel="noopener noreferrer" href="https://support.mozilla.org/">Get Firefox help<!-- --> 🌐</a></li><li data-item="Feedback" role="menuitem"><a target="_blank" rel="noopener noreferrer" href="https://stackoverflow.com/">Get web development help<!-- --> 🌐</a></li><li data-item="Feedback" role="menuitem"><a href="/en-US/docs/MDN/Community">Join the MDN community</a></li><li data-item="Feedback" role="menuitem"><a target="_blank" rel="noopener noreferrer" href="https://github.com/mdn/sprints/issues/new?template=issue-template.md&amp;projects=mdn/sprints/2&amp;labels=user-report&amp;title=%2Fen-US">Report a content problem<!-- --> 🌐</a></li><li data-item="Feedback" role="menuitem"><a target="_blank" rel="noopener noreferrer" href="https://github.com/mdn/kuma/issues/new/choose">Report an issue<!-- --> 🌐</a></li></ul></li></ul></nav><div class="header-search "><form id="nav-main-search" action="/en-US/search" method="get" role="search"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" class="search-icon"><path fill-rule="nonzero" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg><label for="main-q" class="visually-hidden">Search MDN</label><input type="search" class="search-input-field" id="main-q" name="q" placeholder="Search MDN" pattern="(.|\s)*\S(.|\s)*" required=""/></form><button class="toggle-form"><svg xmlns="http://www.w3.org/2000/svg" role="presentation" viewBox="0 0 24 24" class="close-icon"><path d="M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z" fill-rule="nonzero"></path></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" class="search-icon"><path fill-rule="nonzero" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg><span>Open search</span></button></div></header><main role="main"><header class="documentation-page-header"><div class="titlebar-container"><div class="titlebar"><h1 class="title">JavaScript</h1></div></div><div class="full-width-row-container"><div class="max-content-width-container"><nav class="breadcrumbs" role="navigation"><ol typeof="BreadcrumbList" vocab="https://schema.org/" aria-label="breadcrumbs"><li property="itemListElement" typeof="ListItem"><a href="/en-US/docs/Web" class="breadcrumb-previous" property="item" typeof="WebPage"><span class="pre-text">See<!-- --> </span><span property="name">Web technology for developers</span></a><meta property="position" content="1"/></li><li property="itemListElement" typeof="ListItem"><a href="/en-US/docs/Web/JavaScript" class="crumb-current-page" property="item" typeof="WebPage"><span property="name" aria-current="page">JavaScript</span></a><meta property="position" content="2"/></li></ol></nav><div class="dropdown-container language-menu"><button id="header-language-menu" type="button" class="dropdown-menu-label" aria-haspopup="true" aria-owns="language-menu" aria-label="Current language is English. Choose your preferred language.">English<span class="dropdown-arrow-down" aria-hidden="true"></span></button><ul id="language-menu" class="dropdown-menu-items right " aria-expanded="false" role="menu"><li lang="ar" role="menuitem"><a href="/ar/docs/Web/JavaScript" title="Arabic"><bdi>عربي</bdi></a></li><li lang="bg" role="menuitem"><a href="/bg/docs/Web/JavaScript" title="Bulgarian"><bdi>Български</bdi></a></li><li lang="bn" role="menuitem"><a href="/bn/docs/Web/JavaScript" title="Bengali"><bdi>বাংলা</bdi></a></li><li lang="ca" role="menuitem"><a href="/ca/docs/Web/JavaScript" title="Catalan"><bdi>Català</bdi></a></li><li lang="de" role="menuitem"><a href="/de/docs/Web/JavaScript" title="German"><bdi>Deutsch</bdi></a></li><li lang="el" role="menuitem"><a href="/el/docs/Web/JavaScript" title="Greek"><bdi>Ελληνικά</bdi></a></li><li lang="es" role="menuitem"><a href="/es/docs/Web/JavaScript" title="Spanish"><bdi>Español</bdi></a></li><li lang="fa" role="menuitem"><a href="/fa/docs/Web/JavaScript" title="Persian"><bdi>فارسی</bdi></a></li><li lang="fi" role="menuitem"><a href="/fi/docs/Web/JavaScript" title="Finnish"><bdi>suomi</bdi></a></li><li lang="fr" role="menuitem"><a href="/fr/docs/Web/JavaScript" title="French"><bdi>Français</bdi></a></li><li lang="he" role="menuitem"><a href="/he/docs/Web/JavaScript" title="Hebrew"><bdi>עברית</bdi></a></li><li lang="hi-IN" role="menuitem"><a href="/hi-IN/docs/Web/JavaScript" title="Hindi (India)"><bdi>हिन्दी (भारत)</bdi></a></li><li lang="hu" role="menuitem"><a href="/hu/docs/Web/JavaScript" title="Hungarian"><bdi>magyar</bdi></a></li><li lang="id" role="menuitem"><a href="/id/docs/Web/JavaScript" title="Indonesian"><bdi>Bahasa Indonesia</bdi></a></li><li lang="it" role="menuitem"><a href="/it/docs/Web/JavaScript" title="Italian"><bdi>Italiano</bdi></a></li><li lang="ja" role="menuitem"><a href="/ja/docs/Web/JavaScript" title="Japanese"><bdi>日本語</bdi></a></li><li lang="kab" role="menuitem"><a href="/kab/docs/Web/JavaScript" title="Kabyle"><bdi>Taqbaylit</bdi></a></li><li lang="ko" role="menuitem"><a href="/ko/docs/Web/JavaScript" title="Korean"><bdi>한국어</bdi></a></li><li lang="my" role="menuitem"><a href="/my/docs/Web/JavaScript" title="Burmese"><bdi>မြန်မာဘာသာ</bdi></a></li><li lang="nl" role="menuitem"><a href="/nl/docs/Web/JavaScript" title="Dutch"><bdi>Nederlands</bdi></a></li><li lang="pl" role="menuitem"><a href="/pl/docs/Web/JavaScript" title="Polish"><bdi>Polski</bdi></a></li><li lang="pt-BR" role="menuitem"><a href="/pt-BR/docs/Web/JavaScript" title="Portuguese (Brazilian)"><bdi>Português (do Brasil)</bdi></a></li><li lang="pt-PT" role="menuitem"><a href="/pt-PT/docs/Web/JavaScript" title="Portuguese (Portugal)"><bdi>Português (Europeu)</bdi></a></li><li lang="ru" role="menuitem"><a href="/ru/docs/Web/JavaScript" title="Russian"><bdi>Русский</bdi></a></li><li lang="sv-SE" role="menuitem"><a href="/sv-SE/docs/Web/JavaScript" title="Swedish"><bdi>Svenska</bdi></a></li><li lang="th" role="menuitem"><a href="/th/docs/Web/JavaScript" title="Thai"><bdi>ไทย</bdi></a></li><li lang="tr" role="menuitem"><a href="/tr/docs/Web/JavaScript" title="Turkish"><bdi>Türkçe</bdi></a></li><li lang="uk" role="menuitem"><a href="/uk/docs/Web/JavaScript" title="Ukrainian"><bdi>Українська</bdi></a></li><li lang="vi" role="menuitem"><a href="/vi/docs/Web/JavaScript" title="Vietnamese"><bdi>Tiếng Việt</bdi></a></li><li lang="zh-CN" role="menuitem"><a href="/zh-CN/docs/Web/JavaScript" title="Chinese (Simplified)"><bdi>中文 (简体)</bdi></a></li><li lang="zh-TW" role="menuitem"><a href="/zh-TW/docs/Web/JavaScript" title="Chinese (Traditional)"><bdi>正體中文 (繁體)</bdi></a></li><li><a href="https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript$locales" rel="nofollow" id="translations-add">Add a translation</a></li></ul></div></div></div></header><div class="wiki-left-present content-layout"><aside class="document-toc-container"><section class="document-toc"><header><h2>On this Page</h2><button type="button" class="toc-trigger-mobile">Jump to section<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 28" aria-hidden="true" role="img"><path d="M16 11a.99.99 0 01-.297.703l-7 7C8.516 18.89 8.265 19 8 19s-.516-.109-.703-.297l-7-7A.996.996 0 010 11c0-.547.453-1 1-1h14c.547 0 1 .453 1 1z"></path></svg></button></header><ul><li><a href="#Tutorials" rel="internal">Tutorials</a><li><a href="#Reference" rel="internal">Reference</a><li><a href="#Tools_resources" rel="internal">Tools &amp; resources</a><li class="toc-related-topics"><a href="#sidebar-quicklinks">Related topics</a></li></ul></section></aside><div id="content" class="article text-content"><article id="wikiArticle"><div></div>
<p class="summary"><span class="seoSummary"><strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a class="external" href="https://en.wikipedia.org/wiki/Just-in-time_compilation" rel="noopener">just-in-time</a> compiled programming language with <a href="/en-US/docs/Glossary/First-class_Function">first-class functions</a>. While it is most well-known as the scripting language for Web pages, <a class="external" href="https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages" rel="noopener">many non-browser environments</a> also use it, such as <a href="/en-US/docs/Glossary/Node.js">Node.js</a>, <a class="external" href="https://couchdb.apache.org/" rel="noopener">Apache CouchDB</a> and <a class="external" href="http://www.adobe.com/devnet/acrobat/javascript.html" rel="noopener">Adobe Acrobat</a>.</span> JavaScript is a <a href="/en-US/docs/Glossary/Prototype-based_programming">prototype-based</a>, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more <a href="/en-US/docs/Web/JavaScript/About_JavaScript">about JavaScript</a>.</p>
<p>This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. For information about <a href="/en-US/docs/Glossary/API">APIs</a> specific to Web pages, please see <a href="/en-US/docs/Web/API">Web APIs</a> and <a href="/en-US/docs/Glossary/DOM">DOM</a>.</p>
<p>The standard for JavaScript is <a href="/en-US/docs/Web/JavaScript/Language_Resources">ECMAScript</a>. As of 2012, all <a class="external" href="https://kangax.github.io/compat-table/es5/" rel="noopener">modern browsers</a> fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On June 17, 2015, <a class="external" href="https://www.ecma-international.org" rel="noopener">ECMA International</a> published the sixth major version of ECMAScript, which is officially called ECMAScript 2015, and was initially referred to as ECMAScript 6 or ES6. Since then, ECMAScript standards are on yearly release cycles. This documentation refers to the latest draft version, which is currently <a class="external" href="https://tc39.github.io/ecma262/" rel="noopener">ECMAScript 2020</a>.</p>
<p>Do not confuse JavaScript with the <a class="external" href="https://en.wikipedia.org/wiki/Java_(programming_language)" rel="noopener">Java programming language</a>. Both "Java" and "JavaScript" are trademarks or registered trademarks of Oracle in the U.S. and other countries. However, the two programming languages have very different syntax, semantics, and uses.</p>
<div class="column-container">
<div class="column-half">
<h2 id="Tutorials">Tutorials</h2>
<p>Learn how to program in JavaScript with guides and tutorials.</p>
<h3 id="For_complete_beginners">For complete beginners</h3>
<p>Head over to our <a href="/en-US/docs/Learn/JavaScript">Learning Area JavaScript topic</a> if you want to learn JavaScript but have no previous experience of JavaScript or programming. The complete modules available there are as follows:</p>
<dl>
<dt><a href="/en-US/docs/Learn/JavaScript/First_steps">JavaScript first steps</a></dt>
<dd>Answers some fundamental questions such as "what is JavaScript?", "what does it look like?", and "what can it do?", along with discussing key JavaScript features such as variables, strings, numbers, and arrays.</dd>
<dt><a href="/en-US/docs/Learn/JavaScript/Building_blocks">JavaScript building blocks</a></dt>
<dd>Continues our coverage of JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.</dd>
<dt><a href="/en-US/docs/Learn/JavaScript/Objects">Introducing JavaScript objects</a></dt>
<dd>The object-oriented nature of JavaScript is important to understand if you want to go further with your knowledge of the language and write more efficient code, therefore we've provided this module to help you.</dd>
<dt><a href="/en-US/docs/Learn/JavaScript/Asynchronous">Asynchronous JavaScript</a></dt>
<dd>Discusses asynchronous JavaScript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.</dd>
<dt><a href="/en-US/docs/Learn/JavaScript/Client-side_web_APIs">Client-side web APIs</a></dt>
<dd>Explores what APIs are, and how to use some of the most common APIs you'll come across often in your development work.</dd>
</dl>
<h3 id="JavaScript_guide">JavaScript guide</h3>
<dl>
<dt><a href="/en-US/docs/Web/JavaScript/Guide">JavaScript Guide</a></dt>
<dd>A much more detailed guide to the JavaScript language, aimed at those with previous programming experience either in JavaScript or another language.</dd>
</dl>
<h3 id="Intermediate">Intermediate</h3>
<dl>
<dt><a href="/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks">Understanding client-side JavaScript frameworks</a></dt>
<dd>JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. This module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">A re-introduction to JavaScript</a></dt>
<dd>An overview for those who <em>think</em> they know about JavaScript.</dd>
</dl>
<dl>
<dt><a href="/en-US/docs/Web/JavaScript/Data_structures">JavaScript data structures</a></dt>
<dd>Overview of available data structures in JavaScript.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness">Equality comparisons and sameness</a></dt>
<dd>JavaScript provides three different value-comparison operations: strict equality using <code>===</code>, loose equality using <code>==</code>, and the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is"><code>Object.is()</code></a> method.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Closures">Closures</a></dt>
<dd>
<p>A closure is the combination of a function and the lexical environment within which that function was declared.</p>
</dd>
</dl>
<h3 id="Advanced">Advanced</h3>
<dl>
<dt><a href="/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">Inheritance and the prototype chain</a></dt>
<dd>Explanation of the widely misunderstood and under-estimated prototype-based inheritance.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></dt>
<dd>Strict mode defines that you can not use any variable before initializing it. It is a restricted variant of ECMAScript 5, for faster performance and easier debugging.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Typed_arrays">JavaScript typed arrays</a></dt>
<dd>JavaScript typed arrays provide a mechanism for accessing raw binary data.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Memory_Management">Memory Management</a></dt>
<dd>Memory life cycle and garbage collection in JavaScript.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/EventLoop">Concurrency model and Event Loop</a></dt>
<dd>JavaScript has a concurrency model based on an "event loop".</dd>
</dl>
</div>
<div class="column-half">
<h2 id="Reference">Reference</h2>
<p>Browse the complete <a href="/en-US/docs/Web/JavaScript/Reference">JavaScript reference</a> documentation.</p>
<dl>
<dt><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects">Standard objects</a></dt>
<dd>Get to know standard built-in objects <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean"><code>Boolean</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date"><code>Date</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error"><code>Error</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function"><code>Function</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON"><code>JSON</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>Number</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>Object</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp"><code>RegExp</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String"><code>String</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map"><code>Map</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set"><code>Set</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap"><code>WeakMap</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet"><code>WeakSet</code></a>, and others.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Reference/Operators">Expressions and operators</a></dt>
<dd>Learn more about the behavior of JavaScript's operators <a href="/en-US/docs/Web/JavaScript/Reference/Operators/instanceof"><code>instanceof</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Operators/typeof"><code>typeof</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Operators/new"><code>new</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Operators/this"><code>this</code></a>, the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">operator precedence</a>, and more.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Reference/Statements">Statements and declarations</a></dt>
<dd>Learn how <a href="/en-US/docs/Web/JavaScript/Reference/Statements/do...while"><code>do-while</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in"><code>for-in</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of"><code>for-of</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/try...catch"><code>try-catch</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let"><code>let</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/var"><code>var</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/const"><code>const</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/if...else"><code>if-else</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Statements/switch"><code>switch</code></a>, and more JavaScript statements and keywords work.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Reference/Functions">Functions</a></dt>
<dd>Learn how to work with JavaScript's functions to develop your applications.</dd>
</dl>
<h2 id="Tools_resources">Tools &amp; resources</h2>
<p>Helpful tools for writing and debugging your <strong>JavaScript </strong>code.</p>
<dl>
<dt><a href="/en-US/docs/Tools">Firefox Developer Tools</a></dt>
<dd><a href="/en-US/docs/Tools/Web_Console">Web Console</a>, <a href="/en-US/docs/Tools/Profiler">JavaScript Profiler</a>, <a href="/en-US/docs/Tools/Debugger">Debugger</a>, and more.</dd>
<dt><a href="/en-US/docs/Web/JavaScript/Shells">JavaScript Shells</a></dt>
<dd>A JavaScript shell allows you to quickly test snippets of JavaScript code.</dd>
<dt><a class="external" href="https://learnjavascript.online/" rel="noopener">Learn JavaScript</a></dt>
<dd>An excellent resource for aspiring web developers — Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.</dd>
<dt><a class="external" href="https://togetherjs.com/" rel="noopener">TogetherJS</a></dt>
<dd>Collaboration made easy. By adding TogetherJS to your site, your users can help each other out on a website in real-time!</dd>
<dt><a class="external" href="https://stackoverflow.com/questions/tagged/javascript" rel="noopener">Stack Overflow</a></dt>
<dd>Stack Overflow questions tagged with "JavaScript".</dd>
<dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript">JavaScript versions and release notes</a></dt>
<dd>Browse JavaScript's feature history and implementation status.</dd>
<dt><a class="external" href="https://jsfiddle.net/" rel="noopener">JSFiddle</a></dt>
<dd>Edit JavaScript, CSS, HTML and get live results. Use external resources and collaborate with your team online.</dd>
<dt><a class="external" href="https://plnkr.co/" rel="noopener">Plunker</a></dt>
<dd>Plunker is an online community for creating, collaborating on and sharing your web development ideas. Edit your JavaScript, CSS, HTML files and get live results and file structure.</dd>
<dt><a class="external" href="https://jsbin.com/" rel="noopener">JSBin</a></dt>
<dd>
<p>JS Bin is an open-source collaborative web development debugging tool.</p>
</dd>
<dt><a class="external" href="https://codepen.io/" rel="noopener">Codepen</a></dt>
<dd>
<p>Codepen is another collaborative web development tool used as a live result playground.</p>
</dd>
<dt><a class="external" href="https://stackblitz.com/" rel="noopener">StackBlitz</a></dt>
<dd>
<p>StackBlitz is another online playground/debugging tool, which can host and deploy full-stack applications using React, Angular, etc.</p>
</dd>
</dl>
</div>
</div></article><div class="metadata"><section class="document-meta"><header class="visually-hidden"><h4>Metadata</h4></header> <ul><li class="last-modified"><b>Last modified:</b> <time dateTime="2020-06-07T00:02:58.233403">Jun 7, 2020</time>,<!-- --> <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript$history" rel="nofollow">by MDN contributors</a></li></ul></section></div></div><div id="sidebar-quicklinks" class="sidebar"><div class="quick-links"><div class="quick-links-head sidebar-heading">Related Topics</div><div>
<ol>
<li><a href="/en-US/docs/Web/JavaScript"><strong><em>JavaScript</em></strong></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Tutorials"><strong>Tutorials:</strong></a></li>
<li class="toggle">
<details>
<summary>Complete beginners</summary>
<ol>
<li><a href="/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics">JavaScript basics</a></li>
<li><a href="/en-US/docs/Learn/JavaScript/First_steps">JavaScript first steps</a></li>
<li><a href="/en-US/docs/Learn/JavaScript/Building_blocks">JavaScript building blocks</a></li>
<li><a href="/en-US/docs/Learn/JavaScript/Objects">Introducing JavaScript objects</a></li>
</ol>
</details>
</li>
<li class="toggle">
<details>
<summary>JavaScript Guide</summary>
<ol>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Introduction">Introduction</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types">Grammar and types</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling">Control flow and error handling</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration">Loops and iteration</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Functions">Functions</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators">Expressions and operators</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates">Numbers and dates</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Text_formatting">Text formatting</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">Regular expressions</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Indexed_collections">Indexed collections</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Keyed_collections">Keyed collections</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Working_with_Objects">Working with objects</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model">Details of the object model</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Using_promises">Using promises</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators">Iterators and generators</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Meta_programming">Meta programming</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Guide/Modules">JavaScript modules</a></li>
</ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Intermediate</summary>
<ol>
<li><a href="/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks">Client-side JavaScript frameworks</a></li>
<li><a href="/en-US/docs/Learn/JavaScript/Client-side_web_APIs">Client-side web APIs</a></li>
<li><a href="/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">A re-introduction to JavaScript</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Data_structures">JavaScript data structures</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness">Equality comparisons and sameness</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Closures">Closures</a></li>
</ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Advanced</summary>
<ol>
<li><a href="/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">Inheritance and the prototype chain</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Typed_arrays">JavaScript typed arrays</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Memory_Management">Memory Management</a></li>
<li><a href="/en-US/docs/Web/JavaScript/EventLoop">Concurrency model and Event Loop</a></li>
</ol>
</details>
</li>
<li><strong><a href="/en-US/docs/Web/JavaScript/Reference">References:</a></strong></li>
<li class="toggle">
<details>
<summary>Built-in objects</summary>
<ol><li><span class="sidebar-icon"><span class="icon-only-inline" title="This is an experimental API that should not be used in production code."><i class="icon-beaker"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError" title="The AggregateError object represents an error when several errors need to be wrapped in a single error. It is thrown when multiple errors need to be reported by an operation, for example by Promise.any(), when all promises passed to it reject.">AggregateError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="The JavaScript Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.">Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" title="The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer.">ArrayBuffer</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction" title="The AsyncFunction constructor creates a new async function object. In JavaScript, every asynchronous function is actually an AsyncFunction object.">AsyncFunction</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics" title="The Atomics object provides atomic operations as static methods. They are used with SharedArrayBuffer objects.">Atomics</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt" title="BigInt is a built-in object that provides a way to represent whole numbers larger than 253 - 1, which is the largest number JavaScript can reliably represent with the Number primitive and represented by the Number.MAX_SAFE_INTEGER constant. BigInt can be used for arbitrarily large integers.">BigInt</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array" title="The BigInt64Array typed array represents an array of 64-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0n. Once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).">BigInt64Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array" title="The BigUint64Array typed array represents an array of 64-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0n. Once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).">BigUint64Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="The Boolean object is an object wrapper for a boolean value.">Boolean</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" title="The DataView view provides a low-level interface for reading and writing multiple number types in a binary ArrayBuffer, without having to care about the platform's endianness.">DataView</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" title="JavaScript Date objects represent a single moment in time in a platform-independent format.">Date</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" title="Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions. See below for standard built-in error types.">Error</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError" title="The EvalError object indicates an error regarding the global eval() function. This exception is not thrown by JavaScript anymore, however the EvalError object remains for compatibility.">EvalError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry" title="A FinalizationRegistry object lets you request a callback when an object is garbage-collected.">FinalizationRegistry</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array" title="The Float32Array typed array represents an array of 32-bit floating point numbers (corresponding to the C float data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Float32Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array" title="The Float64Array typed array represents an array of 64-bit floating point numbers (corresponding to the C double data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Float64Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" title="Every JavaScript function is actually a Function object. This can be seen with the code (function(){}).constructor === Function, which returns true.">Function</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator" title="The Generator object is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.">Generator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction" title="The GeneratorFunction constructor creates a new generator function object. In JavaScript, every generator function is actually a GeneratorFunction object.">GeneratorFunction</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity" title="The global property Infinity is a numeric value representing infinity.">Infinity</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array" title="The Int16Array typed array represents an array of twos-complement 16-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Int16Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array" title="The Int32Array typed array represents an array of twos-complement 32-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Int32Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array" title="The Int8Array typed array represents an array of twos-complement 8-bit signed integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Int8Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError" title="The InternalError object indicates an error that occurred internally in the JavaScript engine.">InternalError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" title="The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The Intl object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.">Intl</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON" title="The JSON object contains methods for parsing JavaScript Object Notation (JSON) and converting values to JSON. It can't be called or constructed, and aside from its two method properties, it has no interesting functionality of its own.">JSON</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys.">Map</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="Math is a built-in object that has properties and methods for mathematical constants and functions. It’s not a function object.">Math</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN" title="The global NaN property is a value representing Not-A-Number.">NaN</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor. A primitive type object number is created using the Number() function.">Number</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" title="The Object class represents one of JavaScript's data types. It is used to store various keyed collections and more complex entities. Objects can be created using the Object() constructor or the object initializer / literal syntax.">Object</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" title="The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.">Promise</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.">Proxy</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError" title="The RangeError object indicates an error when a value is not in the set or range of allowed values.">RangeError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError" title="The ReferenceError object represents an error when a non-existent variable is referenced.">ReferenceError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect" title="Reflect is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it's not constructible.">Reflect</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp object is used for matching text with a pattern.">RegExp</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references.">Set</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer" title="The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. Unlike an ArrayBuffer, a SharedArrayBuffer cannot become detached.">SharedArrayBuffer</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="The String object is used to represent and manipulate a sequence of characters.">String</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol" title='The data type symbol is a primitive data type. The Symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax "new Symbol()".'>Symbol</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.">SyntaxError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.">TypeError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" title="A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor. Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.">TypedArray</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError" title="The URIError object represents an error when a global URI handling function was used in a wrong way.">URIError</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array" title="The Uint16Array typed array represents an array of 16-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Uint16Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array" title="The Uint32Array typed array represents an array of 32-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Uint32Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array" title="The Uint8Array typed array represents an array of 8-bit unsigned integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Uint8Array</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray" title="The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be set instead; if you specify a non-integer, the nearest integer will be set. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).">Uint8ClampedArray</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced. The keys must be objects and the values can be arbitrary values.">WeakMap</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef" title="A WeakRef object lets you hold a weak reference to another object, without preventing that object from getting garbage-collected.">WeakRef</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet" title="The WeakSet object lets you store weakly held objects in a collection.">WeakSet</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly" title="The WebAssembly JavaScript object acts as the namespace for all WebAssembly-related functionality.">WebAssembly</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI" title="The decodeURI() function decodes a Uniform Resource Identifier (URI) previously created by encodeURI() or by a similar routine.">decodeURI()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent" title="The decodeURIComponent() function decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine.">decodeURIComponent()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI" title='The encodeURI() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'>encodeURI()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent" title='The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).'>encodeURIComponent()</a></li><li><span class="sidebar-icon"><span class="icon-only-inline" title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape" title="The escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.">escape()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval" title="The eval() function evaluates JavaScript code represented as a string.">eval()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis" title="The global globalThis property contains the global this value, which is akin to the global object.">globalThis</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite" title="The global isFinite() function determines whether the passed value is a finite number. If needed, the parameter is first converted to a number.">isFinite()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN" title="The isNaN() function determines whether a value is NaN or not. Note, coercion inside the isNaN function has interesting rules; you may alternatively want to use Number.isNaN(), as defined in ECMAScript 2015.">isNaN()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/null" title="The value null represents the intentional absence of any object value. It is one of JavaScript's primitive values and is treated as falsy for boolean operations.">null</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat" title="The parseFloat() function parses an argument (converting it to a string first if needed) and returns a floating point number.">parseFloat()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt" title="The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems).">parseInt()</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined" title="The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types.">undefined</a></li><li><span class="sidebar-icon"><span class="icon-only-inline" title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/unescape" title="The unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences might be introduced by a function like escape. Usually, decodeURI or decodeURIComponent are preferred over unescape.">unescape()</a></li><li><span class="sidebar-icon"><span class="icon-only-inline" title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval" title="The uneval() function creates a string representation of the source code of an Object.">uneval()</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Expressions &amp; operators</summary>
<ol><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Addition" title="The addition operator produces the sum of numeric operands or string concatenation.">Addition</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators" title="Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. The standard arithmetic operators are addition (+), subtraction (-), multiplication (*), and division (/).">Arithmetic operators</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators" title="An assignment operator assigns a value to its left operand based on the value of its right operand.">Assignment operators</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators" title="Bitwise operators treat their operands as a sequence of 32 bits (zeroes and ones), rather than as decimal, hexadecimal, or octal numbers. For example, the decimal number nine has a binary representation of 1001. Bitwise operators perform their operations on such binary representations, but they return standard JavaScript numerical values.">Bitwise operators</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator" title="The comma operator (,) evaluates each of its operands (from left to right) and returns the value of the last operand. This lets you create a compound expression in which multiple expressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions. This is commonly used to provide multiple parameters to a for loop.">Comma operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators" title="JavaScript has both strict and type–converting comparisons. A strict comparison (e.g., ===) is only true if the operands are of the same type and the contents match. The more commonly-used abstract comparison (e.g. ==) converts the operands to the same type before making the comparison. For relational abstract comparisons (e.g., &lt;=), the operands are first converted to primitives, then to the same type, before comparison.">Comparison operators</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator" title="The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.">Conditional (ternary) operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Decrement" title="The decrement operator decrements (subtracts one from) its operand and returns a value.">Decrement</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" title="The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.">Destructuring assignment</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Division" title="The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.">Division</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Equality" title="The equality operator checks whether its two operands are equal, returning a Boolean result. Unlike the strict equality operator, it attempts to convert and compare operands that are of different types.">Equality</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation" title="The exponentiation operator returns the result of raising the first operand to the power of the second operand.">Exponentiation</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/function" title="The function keyword can be used to define a function inside an expression.">Function expression</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than" title="The greater than operator returns true if the left operand is greater than the right operand.">Greater than</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal" title="The greater than or equal operator returns true if the left operand is greater than or equal to the right operand.">Greater than or equal</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Grouping" title="The grouping operator ( ) controls the precedence of evaluation in expressions.">Grouping operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Increment" title="The increment operator increments (adds one to) its operand and returns a value.">Increment</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Inequality" title="The inequality operator checks whether its two operands are not equal, returning a Boolean result. Unlike the strict inequality operator, it attempts to convert and compare operands that are of different types.">Inequality</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Less_than" title="The less than operator returns true if the left operand is less than the right operand.">Less than</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Less_than_or_equal" title="The less than or equal operator returns true if the left operand is less than or equal to the right operand.">Less than or equal</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND" title="The logical AND (&amp;&amp;) operator (logical conjunction) for a set of operands is true if and only if all of its operands are true. It is typically used with Boolean (logical) values. When it is, it returns a Boolean value. However, the &amp;&amp; operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value.">Logical AND</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_NOT" title="The logical NOT (!) operator (logical complement, negation) takes truth to falsity and vice versa. It is typically used with Boolean (logical) values. When used with non-Boolean values, it returns false if its single operand can be converted to true; otherwise, returns true.">Logical NOT</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR" title="The logical OR (||) operator (logical disjunction) for a set of operands is true if and only if one or more of its operands is true It is typically used with Boolean (logical) values. When it is, it returns a Boolean value. However, the || operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value.">Logical OR</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Multiplication" title="The multiplication operator produces the product of the operands.">Multiplication</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator" title="The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.">Nullish coalescing operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer" title="Objects can be initialized using new Object(), Object.create(), or using the literal notation (initializer notation). An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).">Object initializer</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence" title="Operator precedence determines how operators are parsed concerning each other. Operators with higher precedence become the operands of operators with lower precedence.">Operator precedence</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining" title="The ?. operator functions similarly to the . chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined.">Optional chaining</a></li><li><span class="sidebar-icon"><span class="icon-only-inline" title="This is an experimental API that should not be used in production code."><i class="icon-beaker"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Pipeline_operator" title="The experimental pipeline operator |> (currently at stage 1) pipes the value of an expression into a function. This allows the creation of chained function calls in a readable manner. The result is syntactic sugar in which a function call with a single argument can be written like this:">Pipeline operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors" title="Property accessors provide access to an object's properties by using the dot notation or the bracket notation.">Property accessors</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Remainder" title="The remainder operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend.">Remainder</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax" title="Spread syntax allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.">Spread syntax</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality" title="The strict equality operator checks whether its two operands are equal, returning a Boolean result. Unlike the equality operator, the strict equality operator always considers operands of different types to be different.">Strict equality</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Strict_inequality" title="The strict inequality operator checks whether its two operands are not equal, returning a Boolean result. Unlike the inequality operator, the strict inequality operator always considers operands of different types to be different.">Strict inequality</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Subtraction" title="The subtraction operator subtracts the two operands, producing their difference.">Subtraction</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Unary_negation" title="The unary negation operator precedes its operand and negates it.">Unary negation</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Unary_plus" title="The unary plus operator precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't already.">Unary plus</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/async_function" title="The async function keyword can be used to define async functions inside expressions.">async function expression</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/await" title="The await operator is used to wait for a Promise. It can only be used inside an async function.">await</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/class" title="The class expression is one way to define a class in ECMAScript 2015. Similar to function expressions, class expressions can be named or unnamed. If named, the name of the class is local to the class body only. ">class expression</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/delete" title="The JavaScript delete operator removes a property from an object; if no more references to the same property are held, it is eventually released automatically.">delete operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/function*" title="The function* keyword can be used to define a generator function inside an expression.">function* expression</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/in" title="The in operator returns true if the specified property is in the specified object or its prototype chain.">in operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/instanceof" title="The instanceof operator tests whether the prototype property of a constructor appears anywhere in the prototype chain of an object.">instanceof</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/new" title="The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function.">new operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/new.target" title="The new.target pseudo-property lets you detect whether a function or constructor was called using the new operator. In constructors and functions invoked using the new operator, new.target returns a reference to the constructor or function. In normal function calls, new.target is undefined.">new.target</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/super" title="The super keyword is used to access and call functions on an object's parent.">super</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/this" title="A function's this keyword behaves a little differently in JavaScript compared to other languages. It also has some differences between strict mode and non-strict mode.">this</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/typeof" title="The typeof operator returns a string indicating the type of the unevaluated operand.">typeof</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/void" title="The void operator evaluates the given expression and then returns undefined.">void operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/yield" title="The yield keyword is used to pause and resume a generator function (function* or legacy generator function).">yield</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/yield*" title="The yield* expression is used to delegate to another generator or iterable object.">yield*</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Statements &amp; declarations</summary>
<ol><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/async_function" title="An async function is a function declared with the async keyword. Async functions are instances of the AsyncFunction constructor, and the await keyword is permitted within them. The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.">async function</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/block" title='A block statement (or compound statement in other languages) is used to group zero or more statements. The block is delimited by a pair of braces ("curly brackets") and may optionally be labelled:'>block</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/break" title="The break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.">break</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/class" title="The class declaration creates a new class with a given name using prototype-based inheritance.">class</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/const" title="Constants are block-scoped, much like variables defined using the let keyword. The value of a constant can't be changed through reassignment, and it can't be redeclared.">const</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/continue" title="The continue statement terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.">continue</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/debugger" title="The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect.">debugger</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/do...while" title="The do...while statement creates a loop that executes a specified statement until the test condition evaluates to false. The condition is evaluated after executing the statement, resulting in the specified statement executing at least once.">do...while</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/Empty" title="An empty statement is used to provide no statement, although the JavaScript syntax would expect one.">empty</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/export" title="The export statement is used when creating JavaScript modules to export live bindings to functions, objects, or primitive values from the module so they can be used by other programs with the import statement. Bindings that are exported can still be modified locally; when imported, although they can only be read by the importing module the value updates whenever it is updated by the exporting module.">export</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for" title="The for statement creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually a block statement) to be executed in the loop.">for</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of" title="The for await...of statement creates a loop iterating over async iterable objects as well as on sync iterables, including: built-in String, Array, Array-like objects (e.g., arguments or NodeList), TypedArray, Map, Set, and user-defined async/sync iterables. It invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object. Like await operator, the statement can only be used inside an async function.">for await...of</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in" title="The for...in statement iterates over all enumerable properties of an object that are keyed by strings (ignoring ones keyed by Symbols), including inherited enumerable properties.">for...in</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of" title="The for...of statement creates a loop iterating over iterable objects, including: built-in String, Array, array-like objects (e.g., arguments or NodeList), TypedArray, Map, Set, and user-defined iterables. It invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object.">for...of</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function" title="The function declaration (function statement) defines a function with the specified parameters.">function declaration</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*" title="The function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a Generator object.">function*</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/if...else" title="The if statement executes a statement if a specified condition is truthy. If the condition is falsy, another statement can be executed.">if...else</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/import" title="The static import statement is used to import read only live bindings which are exported by another module. ">import</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/import.meta" title="The import.meta object exposes context-specific metadata to a JavaScript module. It contains information about the module, like the module's URL.">import.meta</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/label" title="The labeled statement can be used with break or continue statements. It is prefixing a statement with an identifier which you can refer to.">label</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/let" title="The let statement declares a block-scoped local variable, optionally initializing it to a value.">let</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/return" title="The return statement ends function execution and specifies a value to be returned to the function caller.">return</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/switch" title="The switch statement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case.">switch</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/throw" title="The throw statement throws a user-defined exception. Execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. If no catch block exists among caller functions, the program will terminate.">throw</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/try...catch" title="The try...catch statement marks a block of statements to try and specifies a response should an exception be thrown.">try...catch</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/var" title="The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value.">var</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/while" title="The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.">while</a></li><li><span class="sidebar-icon"><span class="icon-only-inline" title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></span><a href="/en-US/docs/Web/JavaScript/Reference/Statements/with" title="The with statement extends the scope chain for a statement.">with</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Functions</summary>
<ol><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" title="An arrow function expression is a syntactically compact alternative to a regular function expression, although without its own bindings to the this, arguments, super, or new.target keywords. Arrow function expressions are ill suited as methods, and they cannot be used as constructors.">Arrow function expressions</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters" title="Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.">Default parameters</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions" title="Starting with ECMAScript 2015, a shorter syntax for method definitions on objects initializers is introduced. It is a shorthand for a function assigned to the method's name.">Method definitions</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters" title="The rest parameter syntax allows us to represent an indefinite number of arguments as an array.">Rest parameters</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments" title="arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function.">The arguments object</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/get" title="The get syntax binds an object property to a function that will be called when that property is looked up.">getter</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/set" title="The set syntax binds an object property to a function to be called when there is an attempt to set that property.">setter</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Classes</summary>
<ol><li><a href="/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields" title="Class properties are public by default and can be examined or modified outside the class. In ES2019, the ability to define private class fields using a hash # prefix is added.">Private class fields</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields" title="Both static and instance public fields are writable, enumerable, and configurable properties. As such, unlike their private counterparts, they participate in prototype inheritance.">Public class fields</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Classes/constructor" title="The constructor method is a special method for creating and initializing an object created within a class.">constructor</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Classes/extends" title="The extends keyword is used in class declarations or class expressions to create a class that is a child of another class.">extends</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Classes/static" title="The static keyword defines a static method for a class. Static methods aren't called on instances of the class. Instead, they're called on the class itself.">static</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Errors</summary>
<ol><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied" title='The JavaScript exception "Permission denied to access property" occurs when there was an attempt to access an object for which you have no permission.'>Error: Permission denied to access property "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion" title='The JavaScript exception "too much recursion" or "Maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.'>InternalError: too much recursion</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_codepoint" title='The JavaScript exception "Invalid code point" occurs when NaN values, negative Integers (-1), non-Integers (5.4), or values larger than 0x10FFFF (1114111) are used with String.fromCodePoint().'>RangeError: argument is not a valid code point</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length" title='The JavaScript exception "Invalid array length" occurs when creating an Array or an ArrayBuffer which has a length which is either negative or larger or equal to 232, or when setting the Array.length property to a value which is either negative or larger or equal to 232.'>RangeError: invalid array length</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_date" title='The JavaScript exception "invalid date" occurs when a string leading to an invalid date has been provided to Date or Date.parse().'>RangeError: invalid date</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Precision_range" title="The JavaScript exception &quot;precision is out of range&quot; occurs when a number that's outside of the range of 0 and 20 (or 21) was passed into toFixed or toPrecision.">RangeError: precision is out of range</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Bad_radix" title='The JavaScript exception "radix must be an integer at least 2 and no greater than 36" occurs when the optional radix parameter of the Number.prototype.toString() or the BigInt.prototype.toString() method was specified and is not between 2 and 36.'>RangeError: radix must be an integer</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Resulting_string_too_large" title='The JavaScript exception "repeat count must be less than infinity" occurs when the String.prototype.repeat() method is used with a count argument that is infinity.'>RangeError: repeat count must be less than infinity</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Negative_repetition_count" title='The JavaScript exception "repeat count must be non-negative" occurs when the String.prototype.repeat() method is used with a count argument that is a negative number.'>RangeError: repeat count must be non-negative</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Not_defined" title='The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.'>ReferenceError: "x" is not defined</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Undeclared_var" title='The JavaScript strict mode-only exception "Assignment to undeclated variable" occurs when the value has been assigned to an undeclared variable.'>ReferenceError: assignment to undeclared variable "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init" title="The JavaScript exception &quot;can't access lexical declaration `variable' before initialization&quot; occurs when a lexical variable was accessed before it was initialized. This happens within any block statement, when let or const declarations are accessed before they are defined.">ReferenceError: can't access lexical declaration`X' before initialization</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_caller_or_arguments_usage" title='The JavaScript strict mode-only exception "deprecated caller or arguments usage" occurs when the deprecated Function.caller or Function.arguments properties are used.'>ReferenceError: deprecated caller or arguments usage</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_assignment_left-hand_side" title='The JavaScript exception "invalid assignment left-hand side" occurs when there was an unexpected assignment somewhere. For example, a single "=" sign was used instead of "==" or "===".'>ReferenceError: invalid assignment left-hand side</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Undefined_prop" title="The JavaScript warning &quot;reference to undefined property&quot; occurs when a script attempted to access an object property which doesn't exist.">ReferenceError: reference to undefined property "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_octal" title='The JavaScript strict mode-only exception "0-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead" occurs when deprecated octal literals and octal escape sequences are used.'>SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Strict_Non_Simple_Params" title="The JavaScript exception &quot;'use strict' not allowed in function&quot; occurs when a &quot;use strict&quot; directive is used at the top of a function with default parameters, rest parameters, or destructuring parameters.">SyntaxError: "use strict" not allowed in function with non-simple parameters</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Reserved_identifier" title='The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers.'>SyntaxError: "x" is a reserved identifier</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse" title="The JavaScript exceptions thrown by JSON.parse() occur when string failed to be parsed as JSON.">SyntaxError: JSON.parse: bad parsing</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_formal_parameter" title='The JavaScript exception "malformed formal parameter" occurs when the argument list of a Function() constructor call is invalid somehow.'>SyntaxError: Malformed formal parameter</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_token" title='The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided. This might be a simple typo.'>SyntaxError: Unexpected token</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_source_map_pragma" title='The JavaScript warning "Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead" occurs when there is a deprecated source map syntax in a JavaScript source.'>SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-of_initializer" title="The JavaScript exception &quot;a declaration in the head of a for-of loop can't have an initializer&quot; occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|. This is not allowed in for-of loops.">SyntaxError: a declaration in the head of a for-of loop can't have an initializer</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Delete_in_strict_mode" title="The JavaScript strict mode-only exception &quot;applying the 'delete' operator to an unqualified name is deprecated&quot; occurs when variables are attempted to be deleted using the delete operator.">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer" title='The JavaScript strict mode-only exception "for-in loop head declarations may not have initializers" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|. This is not allowed in for-of loops in strict mode.'>SyntaxError: for-in loop head declarations may not have initializers</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Unnamed_function_statement" title='The JavaScript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name.'>SyntaxError: function statement requires a name</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Identifier_after_number" title='The JavaScript exception "identifier starts immediately after numeric literal" occurs when an identifier started with a digit. Identifiers can only start with a letter, underscore (_), or dollar sign ($).'>SyntaxError: identifier starts immediately after numeric literal</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Illegal_character" title="The JavaScript exception &quot;illegal character&quot; occurs when there is an invalid or unexpected token that doesn't belong at this position in the code.">SyntaxError: illegal character</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Bad_regexp_flag" title='The JavaScript exception "invalid regular expression flag" occurs when the flags, defined after the second slash in regular expression literal, are not one of g, i, m, u, or y.'>SyntaxError: invalid regular expression flag "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_argument_list" title='The JavaScript exception "missing ) after argument list" occurs when there is an error with how a function is called. This might be a typo, a missing operator, or an unescaped string.'>SyntaxError: missing ) after argument list</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_condition" title='The JavaScript exception "missing ) after condition" occurs when there is an error with how an if condition is written. It must appear in parenthesis after the if keyword.'>SyntaxError: missing ) after condition</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_colon_after_property_id" title="The JavaScript exception &quot;missing : after property id&quot; occurs when objects are created using the object initializer syntax. A colon (:) separates keys and values for the object's properties. Somehow, this colon is missing or misplaced.">SyntaxError: missing : after property id</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_semicolon_before_statement" title="The JavaScript exception &quot;missing ; before statement&quot; occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon insertion (ASI). You need to provide a semicolon, so that JavaScript can parse the source code correctly.">SyntaxError: missing ; before statement</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const" title="The JavaScript exception &quot;missing = in const declaration&quot; occurs when a const declaration was not given a value in the same statement (like const RED_FLAG;). You need to provide one (const RED_FLAG = '#ff0').">SyntaxError: missing = in const declaration</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_bracket_after_list" title='The JavaScript exception "missing ] after element list" occurs when there is an error with the array initializer syntax somewhere. Likely there is a closing bracket ("]") or a comma (",") missing.'>SyntaxError: missing ] after element list</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_formal_parameter" title='The JavaScript exception "missing formal parameter" occurs when your function declaration is missing valid parameters.'>SyntaxError: missing formal parameter</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_name_after_dot_operator" title='The JavaScript exception "missing name after . operator" occurs when there is a problem with how the dot operator (.) is used for property access.'>SyntaxError: missing name after . operator</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/No_variable_name" title='The JavaScript exception "missing variable name" occurs way too often as naming things is so hard. Or maybe a comma is wrong. Check for typos!'>SyntaxError: missing variable name</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_function_body" title='The JavaScript exception "missing } after function body" occurs when there is a syntax mistake when creating a function somewhere. Check if any closing curly brackets or parenthesis are in the correct order.'>SyntaxError: missing } after function body</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_property_list" title='The JavaScript exception "missing } after property list" occurs when there is a mistake in the object initializer syntax somewhere. Might be in fact a missing curly bracket, but could also be a missing comma.'>SyntaxError: missing } after property list</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter" title='The JavaScript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.'>SyntaxError: redeclaration of formal parameter "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield" title='The JavaScript exception "return (or yield) not in function" occurs when a return or yield statement is called outside of a function.'>SyntaxError: return not in function</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Equal_as_assign" title='The JavaScript warning "test for equality (==) mistyped as assignment (=)?" occurs when there was an assignment (=) when you would normally expect a test for equality (==).'>SyntaxError: test for equality (==) mistyped as assignment (=)?</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Unterminated_string_literal" title="The JavaScript error &quot;unterminated string literal&quot; occurs when there is an unterminated String somewhere. String literals must be enclosed by single (') or double (&quot;) quotes.">SyntaxError: unterminated string literal</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/No_properties" title="The JavaScript exception &quot;null (or undefined) has no properties&quot; occurs when you attempt to access properties of null and undefined. They don't have any.">TypeError: "x" has no properties</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_type" title='The JavaScript exception "x is (not) y" occurs when there was an unexpected type. Oftentimes, unexpected undefined or null values.'>TypeError: "x" is (not) "y"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_constructor" title='The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor.'>TypeError: "x" is not a constructor</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_function" title='The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value is not actually a function.'>TypeError: "x" is not a function</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/No_non-null_object" title="The JavaScript exception &quot;is not a non-null object&quot; occurs when an object is expected somewhere and wasn't provided. null is not an object and won't work.">TypeError: "x" is not a non-null object</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Read-only" title='The JavaScript strict mode-only exception "is read-only" occurs when a global variable or object property that was assigned to is a read-only property.'>TypeError: "x" is read-only</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/is_not_iterable" title='The JavaScript exception "is not iterable" occurs when the value which is given as the right hand-side of for…of or as argument of a function such as Promise.all or TypedArray.from, is not an iterable object.'>TypeError: 'x' is not iterable</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/More_arguments_needed" title='The JavaScript exception "more arguments needed" occurs when there is an error with how a function is called. More arguments need to be provided.'>TypeError: More arguments needed</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value" title='The JavaScript exception "reduce of empty array with no initial value" occurs when a reduce function is used.'>TypeError: Reduce of empty array with no initial value</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Called_on_incompatible_type" title='The JavaScript exception "called on incompatible target (or object)" occurs when a function (on a given object), is called with a this not corresponding to the type expected by the function.'>TypeError: X.prototype.y called on incompatible type</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Dead_object" title="The JavaScript exception &quot;can't access dead object&quot; occurs when Firefox disallows add-ons to keep strong references to DOM objects after their parent document has been destroyed to improve in memory usage and to prevent memory leaks.">TypeError: can't access dead object</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property" title="The JavaScript exception &quot;can't access property&quot; occurs when property access was operated on undefined or null values.">TypeError: can't access property "x" of "y"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_assign_to_property" title="The JavaScript strict mode exception &quot;can't assign to property&quot; occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean. Primitive values cannot hold any property.">TypeError: can't assign to property "x" on "y": not an object</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible" title="The JavaScript exception &quot;can't define property &quot;x&quot;: &quot;obj&quot; is not extensible&quot; occurs when Object.preventExtensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible.">TypeError: can't define property "x": "obj" is not extensible</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Non_configurable_array_element" title="The JavaScript exception &quot;can't delete non-configurable array element&quot; occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.">TypeError: can't delete non-configurable array element</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property" title="The JavaScript exception &quot;can't redefine non-configurable property&quot; occurs when it was attempted to redefine a property, but that property is non-configurable.">TypeError: can't redefine non-configurable property "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/in_operator_no_object" title="The JavaScript exception &quot;right-hand side of 'in' should be an object&quot; occurs when the in operator was used to search in strings, or in numbers, or other primitive types. It can only be used to check if a property is in an object.">TypeError: cannot use 'in' operator to search for 'x' in 'y'</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value" title="The JavaScript exception &quot;cyclic object value&quot; occurs when object references were found in JSON. JSON.stringify() doesn't try to solve them and fails accordingly.">TypeError: cyclic object value</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/invalid_right_hand_side_instanceof_operand" title="The JavaScript exception &quot;invalid 'instanceof' operand&quot; occurs when the right hand side operands of the instanceof operator isn't used with a constructor object, i.e. an object which has a prototype property and is callable.">TypeError: invalid 'instanceof' operand 'x'</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Array_sort_argument" title="The JavaScript exception &quot;invalid Array.prototype.sort argument&quot; occurs when the argument of Array.prototype.sort() isn't either undefined or a function which compares its operands.">TypeError: invalid Array.prototype.sort argument</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Typed_array_invalid_arguments" title='The JavaScript exception "invalid arguments" occurs when typed array constructors are provided with a wrong argument.'>TypeError: invalid arguments</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment" title="The JavaScript exception &quot;invalid assignment to const&quot; occurs when it was attempted to alter a constant value. JavaScript const declarations can't be re-assigned or redeclared.">TypeError: invalid assignment to const "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Cant_delete" title="The JavaScript exception &quot;property is non-configurable and can't be deleted&quot; occurs when it was attempted to delete a property, but that property is non-configurable.">TypeError: property "x" is non-configurable and can't be deleted</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only" title='The JavaScript strict mode-only exception "setting getter-only property" occurs when there is an attempt to set a new value to a property for which only a getter is specified.'>TypeError: setting getter-only property "x"</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Var_hides_argument" title='The JavaScript strict mode-only exception "variable redeclares argument" occurs when the same variable name occurs as a function parameter and is then redeclared using a var assignment in a function body again.'>TypeError: variable "x" redeclares argument</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_URI" title="The JavaScript exception &quot;malformed URI sequence&quot; occurs when URI encoding or decoding wasn't successful.">URIError: malformed URI sequence</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma" title='The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.'>Warning: -file- is being assigned a //# sourceMappingURL, but already has one</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Bad_octal" title="The JavaScript warning &quot;08 (or 09) is not a legal ECMA-262 octal constant&quot; occurs when 08 or 09 number literals are used. They can't be interpreted as an octal number.">Warning: 08/09 is not a legal ECMA-262 octal constant</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat" title='The JavaScript warning "Date.prototype.toLocaleFormat is deprecated; consider using Intl.DateTimeFormat instead" occurs when the non-standard Date.prototype.toLocaleFormat method is used.'>Warning: Date.prototype.toLocaleFormat is deprecated</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/For-each-in_loops_are_deprecated" title="The JavaScript warning &quot;JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead&quot; occurs when a for each (variable in obj) statement is used.">Warning: JavaScript 1.6's for-each-in loops are deprecated</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics" title="The JavaScript warning about string generics occurs in Firefox versions prior to 68. String generics have been removed starting with Firefox 68.">Warning: String.x is deprecated; use String.prototype.x instead</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_expression_closures" title='The JavaScript warning "expression closures are deprecated" occurs when the non-standard expression closure syntax (shorthand function syntax) is used.'>Warning: expression closures are deprecated</a></li><li><a href="/en-US/docs/Web/JavaScript/Reference/Errors/Stmt_after_return" title='The JavaScript warning "unreachable code after return statement" occurs when using an expression after a return statement, or when using a semicolon-less return statement but including an expression directly after.'>Warning: unreachable code after return statement</a></li></ol>
</details>
</li>
<li class="toggle">
<details>
<summary>Misc</summary>
<ol>
<li><a href="/en-US/docs/Web/JavaScript/JavaScript_technologies_overview">JavaScript technologies overview</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Lexical_grammar">Lexical grammar</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Data_structures">JavaScript data structures</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties">Enumerability and ownership of properties</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">Iteration protocols</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode">Transitioning to strict mode</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Template_literals">Template literals</a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features">Deprecated features</a></li>
</ol>
</details>
</li>
</ol>
</div></div></div></div></main><section class="newsletter-container"><div id="newsletter-form-container" class="newsletter"><form class="newsletter-form nodisable" name="newsletter-form"><section class="newsletter-head"><h2 class="newsletter-teaser">Learn the best of web development</h2><p class="newsletter-description">Get the latest and greatest from MDN delivered straight to your inbox.</p><p class="hidden" aria-hidden="true">The newsletter is offered in English only at the moment.</p></section><fieldset class="newsletter-fields"><input type="hidden" name="fmt" value="H"/><input type="hidden" name="newsletters" value="app-dev"/><div class="form-group newsletter-group-email"><label for="newsletter-email-input" class="form-label offscreen">E-mail</label><input type="email" id="newsletter-email-input" name="email" class="form-input newsletter-input-email" placeholder="you@example.com" required=""/></div><div id="newsletter-privacy" class="form-group form-group-agree newsletter-group-privacy" aria-hidden="false"><input type="checkbox" id="newsletter-privacy-input" name="privacy" required=""/><label for="newsletter-privacy-input">I’m okay with Mozilla handling my info as explained in this <a href="https://www.mozilla.org/privacy/">Privacy Policy</a>.</label></div><div class="newsletter-group-submit"><button id="newsletter-submit" type="submit" class="button neutral newsletter-submit">Sign up now</button></div></fieldset></form><button type="button" class="only-icon newsletter-hide" aria-controls="newsletter-form-container"><span>Hide Newsletter Sign-up</span><svg xmlns="http://www.w3.org/2000/svg" role="presentation" viewBox="0 0 24 24"><path d="M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z" fill-rule="nonzero"></path></svg></button></div></section><footer id="nav-footer" class="nav-footer" data-testid="footer"><div class="content-container"><a href="/en-US/" class="nav-footer-logo">MDN Web Docs</a><ul class="link-list-mdn"><li><a href="/en-US/docs/Web">Web Technologies</a></li><li><a href="/en-US/docs/Learn">Learn Web Development</a></li><li><a href="/en-US/docs/MDN/About">About MDN</a></li><li><a href="/en-US/docs/MDN/Feedback">Feedback</a></li></ul><ul class="link-list-moz"><li><a href="https://www.mozilla.org/about/" target="_blank" rel="noopener noreferrer">About</a></li><li><a href="https://shop.spreadshirt.com/mdn-store/" target="_blank" rel="noopener noreferrer">MDN Web Docs Store</a></li><li><a href="https://www.mozilla.org/contact/" target="_blank" rel="noopener noreferrer">Contact Us</a></li><li><a href="https://www.mozilla.org/firefox/?utm_source=developer.mozilla.org&amp;utm_campaign=footer&amp;utm_medium=referral" target="_blank" rel="noopener noreferrer">Firefox</a></li></ul><div class="social social-mdn"><h4>MDN</h4><ul><li><a href="https://twitter.com/mozdevnet" target="_blank" rel="noopener noreferrer"><svg class="icon icon-twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 28" aria-label="Twitter" role="img" focusable="false"><path d="M25.312 6.375a10.85 10.85 0 01-2.531 2.609c.016.219.016.438.016.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-.828-7.75-2.266.406.047.797.063 1.219.063 2.359 0 4.531-.797 6.266-2.156a5.056 5.056 0 01-4.719-3.5c.313.047.625.078.953.078.453 0 .906-.063 1.328-.172a5.048 5.048 0 01-4.047-4.953v-.063a5.093 5.093 0 002.281.641 5.044 5.044 0 01-2.25-4.203c0-.938.25-1.797.688-2.547a14.344 14.344 0 0010.406 5.281 5.708 5.708 0 01-.125-1.156 5.045 5.045 0 015.047-5.047 5.03 5.03 0 013.687 1.594 9.943 9.943 0 003.203-1.219 5.032 5.032 0 01-2.219 2.781c1.016-.109 2-.391 2.906-.781z"></path></svg></a></li><li><a href="https://github.com/mdn/" target="_blank" rel="noopener noreferrer"><svg class="icon icon-github" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 28" aria-label="GitHub" role="img" focusable="false"><path d="M12 2c6.625 0 12 5.375 12 12 0 5.297-3.437 9.797-8.203 11.391-.609.109-.828-.266-.828-.578 0-.391.016-1.687.016-3.297 0-1.125-.375-1.844-.812-2.219 2.672-.297 5.484-1.313 5.484-5.922 0-1.313-.469-2.375-1.234-3.219.125-.313.531-1.531-.125-3.187-1-.313-3.297 1.234-3.297 1.234a11.28 11.28 0 00-6 0S6.704 6.656 5.704 6.969c-.656 1.656-.25 2.875-.125 3.187-.766.844-1.234 1.906-1.234 3.219 0 4.594 2.797 5.625 5.469 5.922-.344.313-.656.844-.766 1.609-.688.313-2.438.844-3.484-1-.656-1.141-1.844-1.234-1.844-1.234-1.172-.016-.078.734-.078.734.781.359 1.328 1.75 1.328 1.75.703 2.141 4.047 1.422 4.047 1.422 0 1 .016 1.937.016 2.234 0 .313-.219.688-.828.578C3.439 23.796.002 19.296.002 13.999c0-6.625 5.375-12 12-12zM4.547 19.234c.031-.063-.016-.141-.109-.187-.094-.031-.172-.016-.203.031-.031.063.016.141.109.187.078.047.172.031.203-.031zm.484.532c.063-.047.047-.156-.031-.25-.078-.078-.187-.109-.25-.047-.063.047-.047.156.031.25.078.078.187.109.25.047zm.469.703c.078-.063.078-.187 0-.297-.063-.109-.187-.156-.266-.094-.078.047-.078.172 0 .281s.203.156.266.109zm.656.656c.063-.063.031-.203-.063-.297-.109-.109-.25-.125-.313-.047-.078.063-.047.203.063.297.109.109.25.125.313.047zm.891.391c.031-.094-.063-.203-.203-.25-.125-.031-.266.016-.297.109s.063.203.203.234c.125.047.266 0 .297-.094zm.984.078c0-.109-.125-.187-.266-.172-.141 0-.25.078-.25.172 0 .109.109.187.266.172.141 0 .25-.078.25-.172zm.906-.156c-.016-.094-.141-.156-.281-.141-.141.031-.234.125-.219.234.016.094.141.156.281.125s.234-.125.219-.219z"></path></svg></a></li></ul></div><div class="social social-moz"><h4>Mozilla</h4><ul><li><a href="https://twitter.com/mozilla" target="_blank" rel="noopener noreferrer"><svg class="icon icon-twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 28" aria-label="Twitter" role="img" focusable="false"><path d="M25.312 6.375a10.85 10.85 0 01-2.531 2.609c.016.219.016.438.016.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-.828-7.75-2.266.406.047.797.063 1.219.063 2.359 0 4.531-.797 6.266-2.156a5.056 5.056 0 01-4.719-3.5c.313.047.625.078.953.078.453 0 .906-.063 1.328-.172a5.048 5.048 0 01-4.047-4.953v-.063a5.093 5.093 0 002.281.641 5.044 5.044 0 01-2.25-4.203c0-.938.25-1.797.688-2.547a14.344 14.344 0 0010.406 5.281 5.708 5.708 0 01-.125-1.156 5.045 5.045 0 015.047-5.047 5.03 5.03 0 013.687 1.594 9.943 9.943 0 003.203-1.219 5.032 5.032 0 01-2.219 2.781c1.016-.109 2-.391 2.906-.781z"></path></svg></a></li><li><a href="https://www.instagram.com/mozillagram/" target="_blank" rel="noopener noreferrer"><svg class="icon icon-instagram" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 28" aria-label="Instagram" role="img" focusable="false"><path d="M16 14c0-2.203-1.797-4-4-4s-4 1.797-4 4 1.797 4 4 4 4-1.797 4-4zm2.156 0c0 3.406-2.75 6.156-6.156 6.156S5.844 17.406 5.844 14 8.594 7.844 12 7.844s6.156 2.75 6.156 6.156zm1.688-6.406c0 .797-.641 1.437-1.437 1.437S16.97 8.39 16.97 7.594s.641-1.437 1.437-1.437 1.437.641 1.437 1.437zM12 4.156c-1.75 0-5.5-.141-7.078.484-.547.219-.953.484-1.375.906s-.688.828-.906 1.375c-.625 1.578-.484 5.328-.484 7.078s-.141 5.5.484 7.078c.219.547.484.953.906 1.375s.828.688 1.375.906c1.578.625 5.328.484 7.078.484s5.5.141 7.078-.484c.547-.219.953-.484 1.375-.906s.688-.828.906-1.375c.625-1.578.484-5.328.484-7.078s.141-5.5-.484-7.078c-.219-.547-.484-.953-.906-1.375s-.828-.688-1.375-.906C17.5 4.015 13.75 4.156 12 4.156zM24 14c0 1.656.016 3.297-.078 4.953-.094 1.922-.531 3.625-1.937 5.031s-3.109 1.844-5.031 1.937c-1.656.094-3.297.078-4.953.078s-3.297.016-4.953-.078c-1.922-.094-3.625-.531-5.031-1.937S.173 20.875.08 18.953C-.014 17.297.002 15.656.002 14s-.016-3.297.078-4.953c.094-1.922.531-3.625 1.937-5.031s3.109-1.844 5.031-1.937c1.656-.094 3.297-.078 4.953-.078s3.297-.016 4.953.078c1.922.094 3.625.531 5.031 1.937s1.844 3.109 1.937 5.031C24.016 10.703 24 12.344 24 14z"></path></svg></a></li></ul></div><p id="license" class="footer-license">© 2005-<!-- -->2020<!-- --> Mozilla and individual contributors. Content is available under<!-- --> <a href="/docs/MDN/About#Copyrights_and_licenses">these licenses</a>.</p><ul class="footer-legal"><li><a href="https://www.mozilla.org/about/legal/terms/mozilla" target="_blank" rel="noopener noreferrer">Terms</a></li><li><a href="https://www.mozilla.org/privacy/websites/" target="_blank" rel="noopener noreferrer">Privacy</a></li><li><a href="https://www.mozilla.org/privacy/websites/#cookies" target="_blank" rel="noopener noreferrer">Cookies</a></li></ul></div></footer></div>
<script>window._react_data = JSON.parse("{\"locale\":\"en-US\",\"stringCatalog\":{},\"pluralExpression\":null,\"url\":\"/en-US/docs/Web/JavaScript\",\"documentData\":{\"locale\":\"en-US\",\"slug\":\"Web/JavaScript\",\"enSlug\":\"Web/JavaScript\",\"id\":48,\"title\":\"JavaScript\",\"summary\":\"<strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a href=\\\"https://en.wikipedia.org/wiki/Just-in-time_compilation\\\">just-in-time</a> compiled programming language with <a href=\\\"/en-US/docs/Glossary/First-class_Function\\\">first-class functions</a>. While it is most well-known as the scripting language for Web pages, <a class=\\\"external\\\" href=\\\"https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages\\\">many non-browser environments</a> also use it, such as <a href=\\\"/en-US/docs/Glossary/Node.js\\\">Node.js</a>, <a class=\\\"external\\\" href=\\\"https://couchdb.apache.org/\\\">Apache CouchDB</a> and <a class=\\\"external\\\" href=\\\"http://www.adobe.com/devnet/acrobat/javascript.html\\\">Adobe Acrobat</a>.\",\"language\":\"English (US)\",\"hrefLang\":\"en\",\"absoluteURL\":\"/en-US/docs/Web/JavaScript\",\"wikiURL\":\"https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript\",\"editURL\":\"https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript$edit\",\"translateURL\":\"https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript$locales\",\"translationStatus\":null,\"bodyHTML\":\"<div></div>\\n\\n<p class=\\\"summary\\\"><span class=\\\"seoSummary\\\"><strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a class=\\\"external\\\" href=\\\"https://en.wikipedia.org/wiki/Just-in-time_compilation\\\" rel=\\\"noopener\\\">just-in-time</a> compiled programming language with <a href=\\\"/en-US/docs/Glossary/First-class_Function\\\">first-class functions</a>. While it is most well-known as the scripting language for Web pages, <a class=\\\"external\\\" href=\\\"https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages\\\" rel=\\\"noopener\\\">many non-browser environments</a> also use it, such as <a href=\\\"/en-US/docs/Glossary/Node.js\\\">Node.js</a>, <a class=\\\"external\\\" href=\\\"https://couchdb.apache.org/\\\" rel=\\\"noopener\\\">Apache CouchDB</a> and <a class=\\\"external\\\" href=\\\"http://www.adobe.com/devnet/acrobat/javascript.html\\\" rel=\\\"noopener\\\">Adobe Acrobat</a>.</span> JavaScript is a <a href=\\\"/en-US/docs/Glossary/Prototype-based_programming\\\">prototype-based</a>, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more <a href=\\\"/en-US/docs/Web/JavaScript/About_JavaScript\\\">about JavaScript</a>.</p>\\n\\n<p>This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. For information about <a href=\\\"/en-US/docs/Glossary/API\\\">APIs</a> specific to Web pages, please see <a href=\\\"/en-US/docs/Web/API\\\">Web APIs</a> and <a href=\\\"/en-US/docs/Glossary/DOM\\\">DOM</a>.</p>\\n\\n<p>The standard for JavaScript is <a href=\\\"/en-US/docs/Web/JavaScript/Language_Resources\\\">ECMAScript</a>. As of 2012, all <a class=\\\"external\\\" href=\\\"https://kangax.github.io/compat-table/es5/\\\" rel=\\\"noopener\\\">modern browsers</a> fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On June 17, 2015, <a class=\\\"external\\\" href=\\\"https://www.ecma-international.org\\\" rel=\\\"noopener\\\">ECMA International</a> published the sixth major version of ECMAScript, which is officially called ECMAScript 2015, and was initially referred to as ECMAScript 6 or ES6. Since then, ECMAScript standards are on yearly release cycles. This documentation refers to the latest draft version, which is currently <a class=\\\"external\\\" href=\\\"https://tc39.github.io/ecma262/\\\" rel=\\\"noopener\\\">ECMAScript 2020</a>.</p>\\n\\n<p>Do not confuse JavaScript with the <a class=\\\"external\\\" href=\\\"https://en.wikipedia.org/wiki/Java_(programming_language)\\\" rel=\\\"noopener\\\">Java programming language</a>. Both \\\"Java\\\" and \\\"JavaScript\\\" are trademarks or registered trademarks of Oracle in the U.S. and other countries. However, the two programming languages have very different syntax, semantics, and uses.</p>\\n\\n<div class=\\\"column-container\\\">\\n<div class=\\\"column-half\\\">\\n<h2 id=\\\"Tutorials\\\">Tutorials</h2>\\n\\n<p>Learn how to program in JavaScript with guides and tutorials.</p>\\n\\n<h3 id=\\\"For_complete_beginners\\\">For complete beginners</h3>\\n\\n<p>Head over to our <a href=\\\"/en-US/docs/Learn/JavaScript\\\">Learning Area JavaScript topic</a> if you want to learn JavaScript but have no previous experience of JavaScript or programming. The complete modules available there are as follows:</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/First_steps\\\">JavaScript first steps</a></dt>\\n <dd>Answers some fundamental questions such as \\\"what is JavaScript?\\\", \\\"what does it look like?\\\", and \\\"what can it do?\\\", along with discussing key JavaScript features such as variables, strings, numbers, and arrays.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Building_blocks\\\">JavaScript building blocks</a></dt>\\n <dd>Continues our coverage of JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Objects\\\">Introducing JavaScript objects</a></dt>\\n <dd>The object-oriented nature of JavaScript is important to understand if you want to go further with your knowledge of the language and write more efficient code, therefore we've provided this module to help you.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Asynchronous\\\">Asynchronous JavaScript</a></dt>\\n <dd>Discusses asynchronous JavaScript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Client-side_web_APIs\\\">Client-side web APIs</a></dt>\\n <dd>Explores what APIs are, and how to use some of the most common APIs you'll come across often in your development work.</dd>\\n</dl>\\n\\n<h3 id=\\\"JavaScript_guide\\\">JavaScript guide</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Guide\\\">JavaScript Guide</a></dt>\\n <dd>A much more detailed guide to the JavaScript language, aimed at those with previous programming experience either in JavaScript or another language.</dd>\\n</dl>\\n\\n<h3 id=\\\"Intermediate\\\">Intermediate</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks\\\">Understanding client-side JavaScript frameworks</a></dt>\\n <dd>JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. This module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript\\\">A re-introduction to JavaScript</a></dt>\\n <dd>An overview for those who <em>think</em> they know about JavaScript.</dd>\\n</dl>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Data_structures\\\">JavaScript data structures</a></dt>\\n <dd>Overview of available data structures in JavaScript.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness\\\">Equality comparisons and sameness</a></dt>\\n <dd>JavaScript provides three different value-comparison operations: strict equality using <code>===</code>, loose equality using <code>==</code>, and the <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\\\"><code>Object.is()</code></a> method.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Closures\\\">Closures</a></dt>\\n <dd>\\n <p>A closure is the combination of a function and the lexical environment within which that function was declared.</p>\\n </dd>\\n</dl>\\n\\n<h3 id=\\\"Advanced\\\">Advanced</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\\\">Inheritance and the prototype chain</a></dt>\\n <dd>Explanation of the widely misunderstood and under-estimated prototype-based inheritance.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\\\">Strict mode</a></dt>\\n <dd>Strict mode defines that you can not use any variable before initializing it. It is a restricted variant of ECMAScript 5, for faster performance and easier debugging.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Typed_arrays\\\">JavaScript typed arrays</a></dt>\\n <dd>JavaScript typed arrays provide a mechanism for accessing raw binary data.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Memory_Management\\\">Memory Management</a></dt>\\n <dd>Memory life cycle and garbage collection in JavaScript.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/EventLoop\\\">Concurrency model and Event Loop</a></dt>\\n <dd>JavaScript has a concurrency model based on an \\\"event loop\\\".</dd>\\n</dl>\\n</div>\\n\\n<div class=\\\"column-half\\\">\\n<h2 id=\\\"Reference\\\">Reference</h2>\\n\\n<p>Browse the complete <a href=\\\"/en-US/docs/Web/JavaScript/Reference\\\">JavaScript reference</a> documentation.</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects\\\">Standard objects</a></dt>\\n <dd>Get to know standard built-in objects <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\\\"><code>Array</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\\"><code>Boolean</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\\\"><code>Date</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\\\"><code>Error</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\\\"><code>Function</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\\\"><code>JSON</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math\\\"><code>Math</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\\\"><code>Number</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\\\"><code>Object</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\\"><code>RegExp</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\\\"><code>String</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\\\"><code>Map</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\\\"><code>Set</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\\\"><code>WeakMap</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\\\"><code>WeakSet</code></a>, and others.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators\\\">Expressions and operators</a></dt>\\n <dd>Learn more about the behavior of JavaScript's operators <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/instanceof\\\"><code>instanceof</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/typeof\\\"><code>typeof</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/new\\\"><code>new</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/this\\\"><code>this</code></a>, the <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence\\\">operator precedence</a>, and more.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements\\\">Statements and declarations</a></dt>\\n <dd>Learn how <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/do...while\\\"><code>do-while</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for...in\\\"><code>for-in</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for...of\\\"><code>for-of</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/try...catch\\\"><code>try-catch</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/let\\\"><code>let</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/var\\\"><code>var</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/const\\\"><code>const</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/if...else\\\"><code>if-else</code></a>, <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/switch\\\"><code>switch</code></a>, and more JavaScript statements and keywords work.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions\\\">Functions</a></dt>\\n <dd>Learn how to work with JavaScript's functions to develop your applications.</dd>\\n</dl>\\n\\n<h2 id=\\\"Tools_resources\\\">Tools &amp; resources</h2>\\n\\n<p>Helpful tools for writing and debugging your <strong>JavaScript </strong>code.</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Tools\\\">Firefox Developer Tools</a></dt>\\n <dd><a href=\\\"/en-US/docs/Tools/Web_Console\\\">Web Console</a>, <a href=\\\"/en-US/docs/Tools/Profiler\\\">JavaScript Profiler</a>, <a href=\\\"/en-US/docs/Tools/Debugger\\\">Debugger</a>, and more.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Shells\\\">JavaScript Shells</a></dt>\\n <dd>A JavaScript shell allows you to quickly test snippets of JavaScript code.</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://learnjavascript.online/\\\" rel=\\\"noopener\\\">Learn JavaScript</a></dt>\\n <dd>An excellent resource for aspiring web developers \u2014 Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://togetherjs.com/\\\" rel=\\\"noopener\\\">TogetherJS</a></dt>\\n <dd>Collaboration made easy. By adding TogetherJS to your site, your users can help each other out on a website in real-time!</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://stackoverflow.com/questions/tagged/javascript\\\" rel=\\\"noopener\\\">Stack Overflow</a></dt>\\n <dd>Stack Overflow questions tagged with \\\"JavaScript\\\".</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/New_in_JavaScript\\\">JavaScript versions and release notes</a></dt>\\n <dd>Browse JavaScript's feature history and implementation status.</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://jsfiddle.net/\\\" rel=\\\"noopener\\\">JSFiddle</a></dt>\\n <dd>Edit JavaScript, CSS, HTML and get live results. Use external resources and collaborate with your team online.</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://plnkr.co/\\\" rel=\\\"noopener\\\">Plunker</a></dt>\\n <dd>Plunker is an online community for creating, collaborating on and sharing your web development ideas. Edit your JavaScript, CSS, HTML files and get live results and file structure.</dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://jsbin.com/\\\" rel=\\\"noopener\\\">JSBin</a></dt>\\n <dd>\\n <p>JS Bin is an open-source collaborative web development debugging tool.</p>\\n </dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://codepen.io/\\\" rel=\\\"noopener\\\">Codepen</a></dt>\\n <dd>\\n <p>Codepen is another collaborative web development tool used as a live result playground.</p>\\n </dd>\\n <dt><a class=\\\"external\\\" href=\\\"https://stackblitz.com/\\\" rel=\\\"noopener\\\">StackBlitz</a></dt>\\n <dd>\\n <p>StackBlitz is another online playground/debugging tool, which can host and deploy full-stack applications using React, Angular, etc.</p>\\n </dd>\\n</dl>\\n</div>\\n</div>\",\"quickLinksHTML\":\"\\n <ol>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript\\\"><strong><em>JavaScript</em></strong></a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Tutorials\\\"><strong>Tutorials:</strong></a></li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Complete beginners</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics\\\">JavaScript basics</a></li>\\n <li><a href=\\\"/en-US/docs/Learn/JavaScript/First_steps\\\">JavaScript first steps</a></li>\\n <li><a href=\\\"/en-US/docs/Learn/JavaScript/Building_blocks\\\">JavaScript building blocks</a></li>\\n <li><a href=\\\"/en-US/docs/Learn/JavaScript/Objects\\\">Introducing JavaScript objects</a></li>\\n </ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>JavaScript Guide</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Introduction\\\">Introduction</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types\\\">Grammar and types</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling\\\">Control flow and error handling</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration\\\">Loops and iteration</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Functions\\\">Functions</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators\\\">Expressions and operators</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates\\\">Numbers and dates</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Text_formatting\\\">Text formatting</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\\\">Regular expressions</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Indexed_collections\\\">Indexed collections</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Keyed_collections\\\">Keyed collections</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Working_with_Objects\\\">Working with objects</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model\\\">Details of the object model</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Using_promises\\\">Using promises</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators\\\">Iterators and generators</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Meta_programming\\\">Meta programming</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Guide/Modules\\\">JavaScript modules</a></li>\\n </ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Intermediate</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks\\\">Client-side JavaScript frameworks</a></li>\\n <li><a href=\\\"/en-US/docs/Learn/JavaScript/Client-side_web_APIs\\\">Client-side web APIs</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript\\\">A re-introduction to JavaScript</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Data_structures\\\">JavaScript data structures</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness\\\">Equality comparisons and sameness</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Closures\\\">Closures</a></li>\\n </ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Advanced</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\\\">Inheritance and the prototype chain</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\\\">Strict mode</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Typed_arrays\\\">JavaScript typed arrays</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Memory_Management\\\">Memory Management</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/EventLoop\\\">Concurrency model and Event Loop</a></li>\\n </ol>\\n </details>\\n </li>\\n <li><strong><a href=\\\"/en-US/docs/Web/JavaScript/Reference\\\">References:</a></strong></li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Built-in objects</summary>\\n <ol><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This is an experimental API that should not be used in production code.\\\"><i class=\\\"icon-beaker\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\\\" title=\\\"The AggregateError object represents an error when several errors need to be wrapped in a single error. It is thrown when multiple errors need to be reported by an operation, for example by Promise.any(), when all promises passed to it reject.\\\">AggregateError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\\\" title=\\\"The JavaScript Array class is a global object that\u00A0is used in the\u00A0construction\u00A0of\u00A0arrays; which are high-level, list-like objects.\\\">Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\\\" title=\\\"The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer.\\\">ArrayBuffer</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction\\\" title=\\\"The AsyncFunction constructor creates a new async function object. In JavaScript, every asynchronous function is actually an AsyncFunction object.\\\">AsyncFunction</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\\\" title=\\\"The Atomics object provides atomic operations as static methods. They are used with SharedArrayBuffer objects.\\\">Atomics</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt\\\" title=\\\"BigInt is a built-in object that provides a way to represent whole numbers larger than 253 - 1, which is the largest number JavaScript can reliably represent with the Number primitive and represented by the Number.MAX_SAFE_INTEGER constant. BigInt can be used for arbitrarily large integers.\\\">BigInt</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array\\\" title=\\\"The BigInt64Array typed array represents an array of 64-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0n. Once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).\\\">BigInt64Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array\\\" title=\\\"The BigUint64Array typed array represents an array of 64-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0n. Once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).\\\">BigUint64Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\\\" title=\\\"The Boolean object is an object wrapper for a boolean value.\\\">Boolean</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\\\" title=\\\"The DataView view provides a low-level interface for reading and writing multiple number types in a binary ArrayBuffer, without having to care about the platform's endianness.\\\">DataView</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\\\" title=\\\"JavaScript Date objects represent a single moment in time in a platform-independent format.\\\">Date</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\\\" title=\\\"Error objects are thrown when runtime errors occur. The Error object can also be used as a base object\u00A0for user-defined exceptions. See below for standard built-in error types.\\\">Error</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\\\" title=\\\"The EvalError object indicates an error regarding the global eval() function. This exception is not thrown by JavaScript anymore, however the EvalError object remains for compatibility.\\\">EvalError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\\\" title=\\\"A FinalizationRegistry object lets you request a callback when an object is garbage-collected.\\\">FinalizationRegistry</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\\\" title=\\\"The Float32Array typed array represents an array of 32-bit floating point numbers (corresponding to the C float data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Float32Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\\\" title=\\\"The Float64Array typed array represents an array of 64-bit floating point numbers (corresponding to the C double data type) in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Float64Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\\\" title=\\\"Every JavaScript function is actually a Function object. This can be seen with the code (function(){}).constructor === Function, which returns true.\\\">Function</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\\\" title=\\\"The Generator object is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.\\\">Generator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\\\" title=\\\"The GeneratorFunction constructor creates a new generator function object. In JavaScript, every generator function is actually a GeneratorFunction object.\\\">GeneratorFunction</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\\\" title=\\\"The global property Infinity is a numeric value representing infinity.\\\">Infinity</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\\\" title=\\\"The Int16Array typed array represents an array of twos-complement 16-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Int16Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\\\" title=\\\"The Int32Array typed array represents an array of twos-complement 32-bit signed integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Int32Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\\\" title=\\\"The Int8Array typed array represents an array of twos-complement 8-bit signed integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Int8Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\\\" title=\\\"The InternalError object indicates an error that occurred internally in the JavaScript engine.\\\">InternalError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl\\\" title=\\\"The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The Intl object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.\\\">Intl</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\\\" title=\\\"The JSON object contains methods for parsing JavaScript Object Notation (JSON) and converting values to JSON. It can't be called or constructed, and aside from its two method properties, it has no interesting functionality of its own.\\\">JSON</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\\\" title=\\\"The Map object holds key-value pairs and remembers the original insertion order of the keys.\\\">Map</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math\\\" title=\\\"Math is a built-in object that has properties and methods for mathematical constants and functions. It\u2019s not a function object.\\\">Math</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\\\" title=\\\"The global NaN property is a value representing Not-A-Number.\\\">NaN</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\\\" title=\\\"The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor. A primitive type object number is created using the Number() function.\\\">Number</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\\\" title=\\\"The Object class represents one of JavaScript's data types. It is used to store various keyed collections and more complex entities. Objects can be created using the Object() constructor or the object initializer / literal syntax.\\\">Object</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\\\" title=\\\"The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.\\\">Promise</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\\\" title=\\\"The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.\\\">Proxy</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\\\" title=\\\"The RangeError object indicates an error when a value is not in the set or range of allowed values.\\\">RangeError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\\\" title=\\\"The ReferenceError object represents an error when a non-existent variable is referenced.\\\">ReferenceError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\\\" title=\\\"Reflect is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it's not constructible.\\\">Reflect</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\\\" title=\\\"The RegExp object is used for matching text with a pattern.\\\">RegExp</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\\\" title=\\\"The Set object lets you store unique values of any type, whether primitive values or object references.\\\">Set</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer\\\" title=\\\"The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. Unlike an ArrayBuffer, a SharedArrayBuffer cannot become detached.\\\">SharedArrayBuffer</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\\\" title=\\\"The String object is used to represent and manipulate a sequence of characters.\\\">String</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\\\" title='The data type\u00A0symbol is a primitive data type. The Symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax \\\"new Symbol()\\\".'>Symbol</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\\\" title=\\\"The SyntaxError object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.\\\">SyntaxError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\\\" title=\\\"The TypeError object represents an error when an operation could not be performed, typically (but not exclusively) when a\u00A0value is not of the expected type.\\\">TypeError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\\\" title=\\\"A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor.\u00A0 Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.\\\">TypedArray</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\\\" title=\\\"The URIError object represents an error when a global URI handling function was used in a wrong way.\\\">URIError</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\\\" title=\\\"The Uint16Array typed array represents an array of 16-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Uint16Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\\\" title=\\\"The Uint32Array typed array represents an array of 32-bit unsigned integers in the platform byte order. If control over byte order is needed, use DataView instead. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Uint32Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\\\" title=\\\"The Uint8Array typed array represents an array of 8-bit unsigned integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Uint8Array</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\\\" title=\\\"The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be set instead; if you specify a non-integer, the nearest integer\u00A0will be set. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).\\\">Uint8ClampedArray</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\\\" title=\\\"The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced. The keys must be objects and the values can be arbitrary values.\\\">WeakMap</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef\\\" title=\\\"A WeakRef object lets you hold a weak reference to another object, without preventing that object from getting garbage-collected.\\\">WeakRef</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\\\" title=\\\"The WeakSet object lets you store weakly held objects in a collection.\\\">WeakSet</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly\\\" title=\\\"The WebAssembly JavaScript object acts as the namespace for all WebAssembly-related functionality.\\\">WebAssembly</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI\\\" title=\\\"The decodeURI() function decodes a Uniform Resource Identifier (URI) previously created by encodeURI() or by a similar routine.\\\">decodeURI()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent\\\" title=\\\"The decodeURIComponent() function decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or by a similar routine.\\\">decodeURIComponent()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI\\\" title='The encodeURI() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two \\\"surrogate\\\" characters).'>encodeURI()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent\\\" title='The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two \\\"surrogate\\\" characters).'>encodeURIComponent()</a></li><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This deprecated API should no longer be used, but will probably still work.\\\"><i class=\\\"icon-thumbs-down-alt\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape\\\" title=\\\"The escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.\\\">escape()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval\\\" title=\\\"The eval() function evaluates JavaScript code represented as a string.\\\">eval()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis\\\" title=\\\"The global globalThis property contains the global this value, which is akin to the global object.\\\">globalThis</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite\\\" title=\\\"The global isFinite() function determines whether the passed value is a finite number. If \u00A0needed, the parameter is first converted to a number.\\\">isFinite()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN\\\" title=\\\"The isNaN() function determines whether a value is NaN or not. Note,\u00A0coercion inside the isNaN function has interesting rules; you may alternatively want to use Number.isNaN(), as defined in ECMAScript 2015.\\\">isNaN()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\\\" title=\\\"The value null\u00A0represents the intentional absence of any object value. It is one of JavaScript's primitive values and is treated as falsy\u00A0for boolean operations.\\\">null</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat\\\" title=\\\"The parseFloat() function parses an argument (converting it to a string first if needed) and returns a floating point number.\\\">parseFloat()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt\\\" title=\\\"The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems).\\\">parseInt()</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\\\" title=\\\"The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types.\\\">undefined</a></li><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This deprecated API should no longer be used, but will probably still work.\\\"><i class=\\\"icon-thumbs-down-alt\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/unescape\\\" title=\\\"The\u00A0unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences might be introduced by a function like escape. Usually, decodeURI or decodeURIComponent are preferred over unescape.\\\">unescape()</a></li><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This API has not been standardized.\\\"><i class=\\\"icon-warning-sign\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects/uneval\\\" title=\\\"The uneval() function creates a\u00A0string representation of the source code of an Object.\\\">uneval()</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Expressions &amp; operators</summary>\\n <ol><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Addition\\\" title=\\\"The addition operator produces the sum of numeric operands or string concatenation.\\\">Addition</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators\\\" title=\\\"Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. The standard arithmetic operators are addition (+), subtraction (-), multiplication (*), and division (/).\\\">Arithmetic operators</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators\\\" title=\\\"An assignment operator assigns a value to its left operand based on the value of its right operand.\\\">Assignment operators</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators\\\" title=\\\"Bitwise operators treat their operands as a sequence of 32 bits (zeroes and ones), rather than as decimal, hexadecimal, or octal numbers. For example, the decimal number nine has a binary representation of 1001. Bitwise operators perform their operations on such binary representations, but they return standard JavaScript numerical values.\\\">Bitwise operators</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator\\\" title=\\\"The comma operator\u00A0(,) evaluates each of its operands (from left to right) and returns the value of the last operand. This lets you create a compound expression in which multiple expressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions. This is commonly used to provide multiple parameters to a for loop.\\\">Comma operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators\\\" title=\\\"JavaScript has both strict and type\u2013converting comparisons. A strict comparison (e.g., ===) is only true if the operands are of the same type and the contents match. The more commonly-used abstract comparison (e.g. ==) converts the operands to the same type before making the comparison. For relational abstract comparisons (e.g., &lt;=), the operands are first converted to primitives, then to the same type, before comparison.\\\">Comparison operators</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator\\\" title=\\\"The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.\\\">Conditional (ternary) operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Decrement\\\" title=\\\"The decrement operator decrements (subtracts one from) its operand and returns a value.\\\">Decrement</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment\\\" title=\\\"The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.\\\">Destructuring assignment</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Division\\\" title=\\\"The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.\\\">Division</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Equality\\\" title=\\\"The equality operator checks whether its two operands are equal, returning a Boolean result. Unlike the strict equality operator, it attempts to convert and compare operands that are of different types.\\\">Equality</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation\\\" title=\\\"The exponentiation operator returns the result of raising the first operand to the power of the second operand.\\\">Exponentiation</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/function\\\" title=\\\"The function keyword can be used to define a function inside an expression.\\\">Function expression</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than\\\" title=\\\"The greater than operator returns true if the left operand is greater than the right operand.\\\">Greater than</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal\\\" title=\\\"The greater than or equal operator returns true if the left operand is greater than or equal to the right operand.\\\">Greater than or equal</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Grouping\\\" title=\\\"The grouping operator ( ) controls the precedence of evaluation in expressions.\\\">Grouping operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Increment\\\" title=\\\"The increment operator increments (adds one to) its operand and returns a value.\\\">Increment</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Inequality\\\" title=\\\"The inequality operator checks whether its two operands are not equal, returning a Boolean result. Unlike the strict inequality operator, it attempts to convert and compare operands that are of different types.\\\">Inequality</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Less_than\\\" title=\\\"The less than operator returns true if the left operand is less than the right operand.\\\">Less than</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Less_than_or_equal\\\" title=\\\"The less than or equal operator returns true if the left operand is less than or equal to the right operand.\\\">Less than or equal</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND\\\" title=\\\"The logical AND (&amp;&amp;) operator (logical conjunction) for a set of operands is true if and only if all of its operands are true. It is typically used with Boolean (logical) values. When it is, it returns a Boolean value. However, the &amp;&amp; operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value.\\\">Logical AND</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Logical_NOT\\\" title=\\\"The logical NOT (!) operator (logical complement, negation) takes truth to falsity and vice versa. It is typically used with Boolean (logical) values. When used with non-Boolean values, it returns false if its single operand can be converted to true; otherwise, returns true.\\\">Logical NOT</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR\\\" title=\\\"The logical OR (||) operator (logical disjunction) for a set of operands is true if and only if one or more of its operands is true It is typically used with Boolean (logical) values. When it is, it returns a Boolean value. However, the || operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value.\\\">Logical OR</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Multiplication\\\" title=\\\"The multiplication operator produces the product of the operands.\\\">Multiplication</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator\\\" title=\\\"The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.\\\">Nullish coalescing operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer\\\" title=\\\"Objects can be initialized using new Object(), Object.create(), or using the literal notation (initializer notation). An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).\\\">Object initializer</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence\\\" title=\\\"Operator precedence determines how operators are parsed concerning each other. Operators with higher precedence become the operands of operators with lower precedence.\\\">Operator precedence</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining\\\" title=\\\"The ?. operator functions similarly to the . chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined.\\\">Optional chaining</a></li><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This is an experimental API that should not be used in production code.\\\"><i class=\\\"icon-beaker\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Pipeline_operator\\\" title=\\\"The experimental pipeline operator |> (currently at stage 1) pipes the value of an expression into a function. This allows the creation of chained function calls in a readable manner. The result is syntactic sugar in which a function call with a single argument can be written like this:\\\">Pipeline operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors\\\" title=\\\"Property accessors provide access to an object's properties by using the dot notation or the bracket notation.\\\">Property accessors</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Remainder\\\" title=\\\"The remainder operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend.\\\">Remainder</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax\\\" title=\\\"Spread syntax allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.\\\">Spread syntax</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality\\\" title=\\\"The strict equality operator checks whether its two operands are equal, returning a Boolean result. Unlike the equality operator, the strict equality operator always considers operands of different types to be different.\\\">Strict equality</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Strict_inequality\\\" title=\\\"The strict inequality operator checks whether its two operands are not equal, returning a Boolean result. Unlike the inequality operator, the strict inequality operator always considers operands of different types to be different.\\\">Strict inequality</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Subtraction\\\" title=\\\"The subtraction operator subtracts the two operands, producing their difference.\\\">Subtraction</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Unary_negation\\\" title=\\\"The unary negation operator precedes its operand and negates it.\\\">Unary negation</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Unary_plus\\\" title=\\\"The unary plus operator precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't already.\\\">Unary plus</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/async_function\\\" title=\\\"The async function keyword can be used to define async functions inside expressions.\\\">async function expression</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/await\\\" title=\\\"The await operator is used to wait for a Promise. It can only be used inside\u00A0an async function.\\\">await</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/class\\\" title=\\\"The class expression is one way to define a class in ECMAScript 2015. Similar to function expressions, class expressions can be named or unnamed. If named, the name of the class is local to the class body only. \\\">class expression</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/delete\\\" title=\\\"The JavaScript delete operator removes a property from an object; if no more references to the same property are held, it is eventually released automatically.\\\">delete operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/function*\\\" title=\\\"The function* keyword can be used to define a generator function inside an expression.\\\">function* expression</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/in\\\" title=\\\"The in operator returns true if the specified property is in the specified object or its prototype chain.\\\">in operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/instanceof\\\" title=\\\"The instanceof operator tests whether the prototype property of a constructor appears anywhere in the prototype chain of an object.\\\">instanceof</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/new\\\" title=\\\"The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function.\\\">new operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/new.target\\\" title=\\\"The new.target\u00A0pseudo-property lets you detect whether a function or constructor was called using the new operator. In constructors and functions invoked using the new operator, new.target returns a reference to the constructor or function.\u00A0In normal function calls, new.target is undefined.\\\">new.target</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/super\\\" title=\\\"The super keyword is used to access and call functions on an object's parent.\\\">super</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/this\\\" title=\\\"A function's this keyword behaves a little differently in JavaScript compared to other languages. It also has some differences between strict mode and non-strict mode.\\\">this</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/typeof\\\" title=\\\"The typeof operator returns a string indicating the type of the unevaluated operand.\\\">typeof</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/void\\\" title=\\\"The void operator evaluates the given expression and then returns undefined.\\\">void operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/yield\\\" title=\\\"The yield keyword is used to pause and resume a generator function (function* or legacy generator function).\\\">yield</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/yield*\\\" title=\\\"The yield* expression is used to delegate to another generator or iterable object.\\\">yield*</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Statements &amp; declarations</summary>\\n <ol><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/async_function\\\" title=\\\"An\u00A0async function\u00A0is a function declared with the\u00A0async keyword. Async functions are instances of the AsyncFunction constructor, and\u00A0the await keyword is permitted within them.\u00A0The async and await keywords\u00A0enable\u00A0asynchronous, promise-based behavior to be written in a cleaner\u00A0style,\u00A0avoiding\u00A0the need to explicitly configure promise\u00A0chains.\\\">async function</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/block\\\" title='A block statement (or compound statement in other languages) is used to group zero or more statements. The block is delimited by a pair of braces (\\\"curly brackets\\\") and may optionally be labelled:'>block</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/break\\\" title=\\\"The break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.\\\">break</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/class\\\" title=\\\"The class declaration creates a new class with a given name using prototype-based inheritance.\\\">class</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/const\\\" title=\\\"Constants are block-scoped, much like variables defined using the let keyword. The value of a constant can't be\u00A0changed through reassignment, and it can't be redeclared.\\\">const</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/continue\\\" title=\\\"The continue statement terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.\\\">continue</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/debugger\\\" title=\\\"The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect.\\\">debugger</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/do...while\\\" title=\\\"The do...while statement creates a loop that executes a specified statement until the test condition evaluates to false. The condition is evaluated after executing the statement, resulting in the specified statement executing at least once.\\\">do...while</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/Empty\\\" title=\\\"An empty statement is used to provide no statement, although the JavaScript syntax would expect one.\\\">empty</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/export\\\" title=\\\"The export statement is used when creating JavaScript modules to export live bindings to functions, objects, or primitive values from the module so they can be used by other programs with the import statement. Bindings that are exported can still be modified locally; when imported, although they can only be read by the importing module the value updates whenever it is updated by the exporting module.\\\">export</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for\\\" title=\\\"The for statement creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually a block statement) to be executed in the loop.\\\">for</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of\\\" title=\\\"The for await...of statement creates a loop iterating over async iterable objects as well as on sync iterables, including: built-in String, Array,\u00A0Array-like objects (e.g.,\u00A0arguments or\u00A0NodeList), TypedArray, Map, Set, and user-defined async/sync iterables. It invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object. Like await operator, the statement can only be used inside\u00A0an async function.\\\">for await...of</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for...in\\\" title=\\\"The for...in statement iterates over all enumerable properties\u00A0of an object that are keyed by strings (ignoring ones keyed by Symbols), including inherited enumerable properties.\\\">for...in</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/for...of\\\" title=\\\"The for...of statement creates a loop iterating over iterable objects, including: built-in String, Array, array-like objects (e.g., arguments or\u00A0NodeList), TypedArray, Map, Set, and user-defined iterables. It invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object.\\\">for...of</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/function\\\" title=\\\"The function declaration (function statement) defines a function with the specified parameters.\\\">function declaration</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/function*\\\" title=\\\"The function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a Generator object.\\\">function*</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/if...else\\\" title=\\\"The if statement executes a statement if a specified condition is truthy. If the condition is falsy, another statement can be executed.\\\">if...else</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/import\\\" title=\\\"The static import statement is used to import read only live bindings which are exported by another module. \\\">import</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/import.meta\\\" title=\\\"The import.meta object exposes context-specific metadata to a JavaScript module. It contains information about the module, like the module's URL.\\\">import.meta</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/label\\\" title=\\\"The labeled statement can be used with break or continue statements. It is prefixing a statement with an identifier which you can refer to.\\\">label</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/let\\\" title=\\\"The let statement declares a block-scoped local variable, optionally initializing it to a value.\\\">let</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/return\\\" title=\\\"The return statement ends function execution and specifies a value to be returned to the function caller.\\\">return</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/switch\\\" title=\\\"The switch statement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case.\\\">switch</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/throw\\\" title=\\\"The throw statement throws a user-defined exception. Execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. If no catch block exists among caller functions, the program will terminate.\\\">throw</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/try...catch\\\" title=\\\"The try...catch statement marks a block of statements to try and specifies a response should an exception be thrown.\\\">try...catch</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/var\\\" title=\\\"The var statement declares a function-scoped\u00A0or globally-scoped\u00A0variable, optionally initializing it to a value.\\\">var</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/while\\\" title=\\\"The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.\\\">while</a></li><li><span class=\\\"sidebar-icon\\\"><span class=\\\"icon-only-inline\\\" title=\\\"This deprecated API should no longer be used, but will probably still work.\\\"><i class=\\\"icon-thumbs-down-alt\\\"> </i></span></span><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements/with\\\" title=\\\"The with statement extends the scope chain for a statement.\\\">with</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Functions</summary>\\n <ol><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions\\\" title=\\\"An arrow function expression is a syntactically compact\u00A0alternative to a\u00A0regular\u00A0function expression, although without\u00A0its own bindings to the\u00A0this, arguments, super, or new.target\u00A0keywords. Arrow\u00A0function expressions are ill suited as\u00A0methods,\u00A0and they cannot\u00A0be used as constructors.\\\">Arrow function expressions</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters\\\" title=\\\"Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.\\\">Default parameters</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions\\\" title=\\\"Starting with ECMAScript 2015, a shorter syntax for method definitions on objects initializers is introduced. It is a shorthand for a function assigned to the method's name.\\\">Method definitions</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters\\\" title=\\\"The rest parameter syntax allows us to represent an indefinite number of arguments as an array.\\\">Rest parameters</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/arguments\\\" title=\\\"arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function.\\\">The arguments object</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/get\\\" title=\\\"The get syntax binds an object property to a function that will be called when that property is looked up.\\\">getter</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions/set\\\" title=\\\"The set syntax binds an object property to a function to be called when there is an attempt to set that property.\\\">setter</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Classes</summary>\\n <ol><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields\\\" title=\\\"Class properties are public by default and can be examined or modified outside the class. In ES2019, the ability to define private class fields using a hash # prefix is added.\\\">Private class fields</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields\\\" title=\\\"Both static and instance public fields are writable, enumerable, and configurable properties. As such, unlike their private counterparts, they participate in prototype inheritance.\\\">Public class fields</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Classes/constructor\\\" title=\\\"The constructor method is a special method for creating and initializing an object created within a class.\\\">constructor</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Classes/extends\\\" title=\\\"The extends keyword is used in class declarations or class expressions to create a class that is a child of another class.\\\">extends</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Classes/static\\\" title=\\\"The static keyword defines a static method for a class. Static methods aren't called on instances of the class. Instead, they're called on the class itself.\\\">static</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Errors</summary>\\n <ol><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied\\\" title='The JavaScript exception \\\"Permission denied to access property\\\" occurs when there was an attempt to access an object for which you have no permission.'>Error: Permission denied to access property \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion\\\" title='The JavaScript exception \\\"too much recursion\\\" or \\\"Maximum call stack size exceeded\\\" occurs when there are too many function calls, or a function is missing a base case.'>InternalError: too much recursion</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_codepoint\\\" title='The JavaScript exception \\\"Invalid code point\\\" occurs when NaN values, negative Integers (-1), non-Integers (5.4), or values larger than 0x10FFFF (1114111) are used with String.fromCodePoint().'>RangeError: argument is not a valid code point</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\\\" title='The JavaScript exception \\\"Invalid array length\\\" occurs when creating an\u00A0Array or an\u00A0ArrayBuffer which has a length which is either negative or larger or equal to 232, or when setting the Array.length property to a value which is either negative or larger or equal to 232.'>RangeError: invalid array length</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_date\\\" title='The JavaScript exception \\\"invalid date\\\" occurs when a string leading to an invalid date has been provided to Date or Date.parse().'>RangeError: invalid date</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Precision_range\\\" title=\\\"The JavaScript exception &quot;precision is out of range&quot; occurs when a number that's outside of the range of 0 and 20 (or 21) was passed into toFixed or toPrecision.\\\">RangeError: precision is out of range</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Bad_radix\\\" title='The JavaScript exception \\\"radix must be an integer at least 2 and no greater than 36\\\" occurs when the optional radix parameter of the Number.prototype.toString() or the\u00A0BigInt.prototype.toString() method was specified and is not between 2 and 36.'>RangeError: radix must be an integer</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Resulting_string_too_large\\\" title='The JavaScript exception \\\"repeat count must be less than infinity\\\" occurs when the String.prototype.repeat() method is used with a count argument that is infinity.'>RangeError: repeat count must be less than infinity</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Negative_repetition_count\\\" title='The JavaScript exception \\\"repeat count must be non-negative\\\" occurs when the String.prototype.repeat() method is used with a count argument that is a negative number.'>RangeError: repeat count must be non-negative</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Not_defined\\\" title='The JavaScript exception \\\"variable is not defined\\\" occurs when there is a non-existent variable referenced somewhere.'>ReferenceError: \\\"x\\\" is not defined</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Undeclared_var\\\" title='The JavaScript strict mode-only exception \\\"Assignment to undeclated variable\\\" occurs when the value has been assigned to an undeclared variable.'>ReferenceError: assignment to undeclared variable \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_lexical_declaration_before_init\\\" title=\\\"The JavaScript exception &quot;can't access lexical declaration `variable' before initialization&quot; occurs when a lexical variable was accessed before it was initialized. This happens within any block statement, when let or const declarations are accessed before they are defined.\\\">ReferenceError: can't access lexical declaration`X' before initialization</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_caller_or_arguments_usage\\\" title='The JavaScript strict mode-only exception \\\"deprecated caller or arguments usage\\\" occurs when the deprecated Function.caller or Function.arguments properties are used.'>ReferenceError: deprecated caller or arguments usage</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_assignment_left-hand_side\\\" title='The JavaScript exception \\\"invalid assignment left-hand side\\\" occurs when there was an unexpected assignment somewhere. For example, a single \\\"=\\\" sign was used instead of \\\"==\\\" or \\\"===\\\".'>ReferenceError: invalid assignment left-hand side</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Undefined_prop\\\" title=\\\"The JavaScript warning &quot;reference to undefined property&quot; occurs when a script attempted to access an object property which doesn't exist.\\\">ReferenceError: reference to undefined property \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_octal\\\" title='The JavaScript\u00A0strict mode-only exception \\\"0-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the \\\"0o\\\" prefix instead\\\" occurs when deprecated octal literals and octal escape sequences are used.'>SyntaxError: \\\"0\\\"-prefixed octal literals and octal escape seq. are deprecated</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Strict_Non_Simple_Params\\\" title=\\\"The JavaScript exception &quot;'use strict' not allowed in function&quot; occurs when a &quot;use strict&quot; directive is used at the top of a function with default parameters, rest parameters, or destructuring parameters.\\\">SyntaxError: \\\"use strict\\\" not allowed in function with non-simple parameters</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Reserved_identifier\\\" title='The JavaScript exception \\\"variable is a reserved identifier\\\" occurs when reserved keywords are used as identifiers.'>SyntaxError: \\\"x\\\" is a reserved identifier</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse\\\" title=\\\"The JavaScript exceptions thrown by JSON.parse() occur when string failed to be parsed as JSON.\\\">SyntaxError: JSON.parse: bad parsing</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_formal_parameter\\\" title='The JavaScript exception \\\"malformed formal parameter\\\" occurs when the argument list of a Function() constructor call is invalid somehow.'>SyntaxError: Malformed formal parameter</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_token\\\" title='The JavaScript exceptions \\\"unexpected token\\\" occur when a specific language construct was expected, but something else was provided. This might be a simple typo.'>SyntaxError: Unexpected token</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_source_map_pragma\\\" title='The JavaScript warning \\\"Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead\\\" occurs when there is a deprecated source map syntax in a JavaScript source.'>SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-of_initializer\\\" title=\\\"The JavaScript exception &quot;a declaration in the head of a for-of loop can't have an initializer&quot; occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|. This is not allowed in for-of loops.\\\">SyntaxError: a declaration in the head of a for-of loop can't have an initializer</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Delete_in_strict_mode\\\" title=\\\"The JavaScript strict mode-only exception &quot;applying the 'delete' operator to an unqualified name is deprecated&quot; occurs when variables are attempted to be deleted using the delete operator.\\\">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer\\\" title='The JavaScript\u00A0strict mode-only exception \\\"for-in loop head declarations may not have initializers\\\" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|. This is not allowed in for-of loops in strict mode.'>SyntaxError: for-in loop head declarations may not have initializers</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Unnamed_function_statement\\\" title='The JavaScript exception \\\"function statement requires a name\\\" occurs when there is a function statement in the code that requires a name.'>SyntaxError: function statement requires a name</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Identifier_after_number\\\" title='The JavaScript exception \\\"identifier starts immediately after numeric literal\\\" occurs when an identifier started with a digit. Identifiers can only start with a letter, underscore (_), or dollar sign ($).'>SyntaxError: identifier starts immediately after numeric literal</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Illegal_character\\\" title=\\\"The JavaScript exception &quot;illegal character&quot; occurs when there is an invalid or unexpected token that doesn't belong at this position in the code.\\\">SyntaxError: illegal character</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Bad_regexp_flag\\\" title='The JavaScript exception \\\"invalid regular expression flag\\\" occurs when the flags, defined after the second slash in regular expression literal, are not one of g, i, m, u, or y.'>SyntaxError: invalid regular expression flag \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_argument_list\\\" title='The JavaScript exception \\\"missing ) after argument list\\\" occurs when there is an error with how a function is called. This might be a typo, a missing operator, or an unescaped string.'>SyntaxError: missing ) after argument list</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_parenthesis_after_condition\\\" title='The JavaScript exception \\\"missing ) after condition\\\" occurs when there is an error with how an if condition is written. It must appear in parenthesis after the if keyword.'>SyntaxError: missing ) after condition</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_colon_after_property_id\\\" title=\\\"The JavaScript exception &quot;missing : after property id&quot; occurs when objects are created using the object initializer syntax. A colon (:) separates keys and values for the object's properties. Somehow, this colon is missing or misplaced.\\\">SyntaxError: missing : after property id</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_semicolon_before_statement\\\" title=\\\"The JavaScript exception &quot;missing ; before statement&quot; occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon insertion (ASI). You need to provide a semicolon, so that JavaScript can parse the source code correctly.\\\">SyntaxError: missing ; before statement</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_initializer_in_const\\\" title=\\\"The JavaScript exception &quot;missing = in const declaration&quot; occurs when a const declaration was not given a value in the same statement (like const RED_FLAG;). You need to provide one (const RED_FLAG = '#ff0').\\\">SyntaxError: missing = in const declaration</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_bracket_after_list\\\" title='The JavaScript exception \\\"missing ] after element list\\\" occurs when there is an error with the array initializer syntax somewhere. Likely there is a closing bracket (\\\"]\\\") or a comma (\\\",\\\") missing.'>SyntaxError: missing ] after element list</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_formal_parameter\\\" title='The JavaScript exception \\\"missing formal parameter\\\" occurs when your function declaration is missing valid parameters.'>SyntaxError: missing formal parameter</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_name_after_dot_operator\\\" title='The JavaScript exception \\\"missing name after . operator\\\" occurs when there is a problem with how the dot operator (.) is used for property access.'>SyntaxError: missing name after . operator</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/No_variable_name\\\" title='The JavaScript exception \\\"missing variable name\\\" occurs way too often as naming things is so hard. Or maybe a comma is wrong. Check for typos!'>SyntaxError: missing variable name</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_function_body\\\" title='The JavaScript exception \\\"missing } after function body\\\" occurs when there is a syntax mistake when creating a function somewhere. Check if any closing curly brackets or parenthesis are in the correct order.'>SyntaxError: missing } after function body</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Missing_curly_after_property_list\\\" title='The JavaScript exception \\\"missing } after property list\\\" occurs when there is a mistake in the object initializer syntax somewhere. Might be in fact a missing curly bracket, but could also be a missing comma.'>SyntaxError: missing } after property list</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter\\\" title='The JavaScript exception \\\"redeclaration of formal parameter\\\" occurs when the same variable name occurs as a function parameter and is then redeclared using a let assignment in a function body again.'>SyntaxError: redeclaration of formal parameter \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Bad_return_or_yield\\\" title='The JavaScript exception \\\"return (or yield) not in function\\\" occurs when a return or yield statement is called outside of a function.'>SyntaxError: return not in function</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Equal_as_assign\\\" title='The JavaScript warning \\\"test for equality (==) mistyped as assignment (=)?\\\" occurs when there was an assignment (=) when you would normally expect a test for equality (==).'>SyntaxError: test for equality (==) mistyped as assignment (=)?</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Unterminated_string_literal\\\" title=\\\"The JavaScript error &quot;unterminated string literal&quot; occurs when there is an unterminated String somewhere. String literals must be enclosed by single (') or double (&quot;) quotes.\\\">SyntaxError: unterminated string literal</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/No_properties\\\" title=\\\"The JavaScript exception &quot;null (or undefined) has no properties&quot; occurs when you attempt to access properties of null and undefined. They don't have any.\\\">TypeError: \\\"x\\\" has no properties</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_type\\\" title='The JavaScript exception \\\"x is (not) y\\\" occurs when there was an unexpected type. Oftentimes, unexpected undefined or null values.'>TypeError: \\\"x\\\" is (not) \\\"y\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_constructor\\\" title='The JavaScript exception \\\"is not a constructor\\\" occurs when there was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor.'>TypeError: \\\"x\\\" is not a constructor</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_function\\\" title='The JavaScript exception \\\"is not a function\\\" occurs when there was an attempt to call a value from a function, but the value is not actually a function.'>TypeError: \\\"x\\\" is not a function</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/No_non-null_object\\\" title=\\\"The JavaScript exception &quot;is not a non-null object&quot; occurs when an object is expected somewhere and wasn't provided. null is not an object and won't work.\\\">TypeError: \\\"x\\\" is not a non-null object</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Read-only\\\" title='The JavaScript\u00A0strict mode-only exception \\\"is read-only\\\" occurs when a global variable or object property that was assigned to is a read-only property.'>TypeError: \\\"x\\\" is read-only</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/is_not_iterable\\\" title='The JavaScript exception \\\"is not iterable\\\" occurs when the value which is given as the right hand-side of for\u2026of or as argument of a function such as Promise.all or TypedArray.from, is not an iterable object.'>TypeError: 'x' is not iterable</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/More_arguments_needed\\\" title='The JavaScript exception \\\"more arguments needed\\\" occurs when there is an error with how a function is called. More arguments need to be provided.'>TypeError: More arguments needed</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value\\\" title='The JavaScript exception \\\"reduce of empty array with no initial value\\\" occurs when a reduce function is used.'>TypeError: Reduce of empty array with no initial value</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Called_on_incompatible_type\\\" title='The JavaScript exception \\\"called on incompatible target (or object)\\\" occurs when a function (on a given object), is called with a this not corresponding to the type expected by the function.'>TypeError: X.prototype.y called on incompatible type</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Dead_object\\\" title=\\\"The JavaScript exception &quot;can't access dead object&quot; occurs when Firefox disallows add-ons to keep strong references to DOM objects after their parent document has been destroyed to improve in memory usage and to prevent memory leaks.\\\">TypeError: can't access dead object</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property\\\" title=\\\"The JavaScript exception &quot;can't access property&quot; occurs when property access was operated on undefined or null values.\\\">TypeError: can't access property \\\"x\\\" of \\\"y\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_assign_to_property\\\" title=\\\"The JavaScript strict mode exception &quot;can't assign to property&quot; occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean. Primitive values cannot hold any property.\\\">TypeError: can't assign to property \\\"x\\\" on \\\"y\\\": not an object</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible\\\" title=\\\"The JavaScript exception &quot;can't define property &quot;x&quot;: &quot;obj&quot; is not extensible&quot; occurs when Object.preventExtensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible.\\\">TypeError: can't define property \\\"x\\\": \\\"obj\\\" is not extensible</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Non_configurable_array_element\\\" title=\\\"The JavaScript exception &quot;can't delete non-configurable array element&quot; occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.\\\">TypeError: can't delete non-configurable array element</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property\\\" title=\\\"The JavaScript exception &quot;can't redefine non-configurable property&quot; occurs when it was attempted to redefine a property, but that property is non-configurable.\\\">TypeError: can't redefine non-configurable property \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/in_operator_no_object\\\" title=\\\"The JavaScript exception &quot;right-hand side of 'in' should be an object&quot; occurs when the in operator was used to search in strings, or in numbers, or other primitive types. It can only be used to check if a property is in an object.\\\">TypeError: cannot use 'in' operator to search for 'x' in 'y'</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value\\\" title=\\\"The JavaScript exception &quot;cyclic object value&quot; occurs when\u00A0object references were found in JSON. JSON.stringify() doesn't try to solve them and fails accordingly.\\\">TypeError: cyclic object value</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/invalid_right_hand_side_instanceof_operand\\\" title=\\\"The JavaScript exception &quot;invalid 'instanceof' operand&quot; occurs when the\u00A0right hand side operands of the instanceof operator isn't used with a constructor object, i.e. an object which has a prototype property and is callable.\\\">TypeError: invalid 'instanceof' operand 'x'</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Array_sort_argument\\\" title=\\\"The JavaScript exception &quot;invalid Array.prototype.sort argument&quot; occurs when the argument of Array.prototype.sort() isn't either undefined or a function which compares its operands.\\\">TypeError: invalid Array.prototype.sort argument</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Typed_array_invalid_arguments\\\" title='The JavaScript exception \\\"invalid arguments\\\" occurs when typed array constructors are provided with a wrong argument.'>TypeError: invalid arguments</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment\\\" title=\\\"The JavaScript exception &quot;invalid assignment to const&quot; occurs when it was attempted to alter a constant value. JavaScript const declarations can't be re-assigned or redeclared.\\\">TypeError: invalid assignment to const \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Cant_delete\\\" title=\\\"The JavaScript exception &quot;property is non-configurable and can't be deleted&quot; occurs when it was attempted to delete a property, but that property is non-configurable.\\\">TypeError: property \\\"x\\\" is non-configurable and can't be deleted</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\\\" title='The JavaScript\u00A0strict mode-only exception \\\"setting getter-only property\\\" occurs when there is an attempt to set a new value to a property for which only a getter is specified.'>TypeError: setting getter-only property \\\"x\\\"</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Var_hides_argument\\\" title='The JavaScript\u00A0strict mode-only exception \\\"variable redeclares argument\\\" occurs when the same variable name occurs as a function parameter and is then redeclared using a var assignment in a function body again.'>TypeError: variable \\\"x\\\" redeclares argument</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_URI\\\" title=\\\"The JavaScript exception &quot;malformed URI sequence&quot; occurs when URI encoding or decoding wasn't successful.\\\">URIError: malformed URI sequence</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma\\\" title='The JavaScript warning \\\"-file- is being assigned a //# sourceMappingURL, but already has one.\\\" occurs when a source map has been specified more than once for a given JavaScript source.'>Warning: -file- is being assigned a //# sourceMappingURL, but already has one</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Bad_octal\\\" title=\\\"The JavaScript warning &quot;08 (or 09) is not a legal ECMA-262 octal constant&quot; occurs when 08 or 09 number literals are used. They can't be interpreted as an octal number.\\\">Warning: 08/09 is not a legal ECMA-262 octal constant</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat\\\" title='The JavaScript warning \\\"Date.prototype.toLocaleFormat is deprecated; consider using Intl.DateTimeFormat instead\\\" occurs when the non-standard Date.prototype.toLocaleFormat method is used.'>Warning: Date.prototype.toLocaleFormat is deprecated</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/For-each-in_loops_are_deprecated\\\" title=\\\"The JavaScript warning &quot;JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead&quot; occurs when a for each (variable in obj) statement is used.\\\">Warning: JavaScript 1.6's for-each-in loops are deprecated</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics\\\" title=\\\"The JavaScript warning about string generics occurs in Firefox versions prior to 68. String generics have been removed starting with Firefox 68.\\\">Warning: String.x is deprecated; use String.prototype.x instead</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_expression_closures\\\" title='The JavaScript warning \\\"expression closures are deprecated\\\" occurs when the non-standard expression closure syntax (shorthand function syntax) is used.'>Warning: expression closures are deprecated</a></li><li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Errors/Stmt_after_return\\\" title='The JavaScript warning \\\"unreachable code after return statement\\\" occurs when using an expression after a return statement, or when using a semicolon-less return statement but including an expression directly after.'>Warning: unreachable code after return statement</a></li></ol>\\n </details>\\n </li>\\n <li class=\\\"toggle\\\">\\n <details>\\n <summary>Misc</summary>\\n <ol>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/JavaScript_technologies_overview\\\">JavaScript technologies overview</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Lexical_grammar\\\">Lexical grammar</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Data_structures\\\">JavaScript data structures</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties\\\">Enumerability and ownership of properties</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Iteration_protocols\\\">Iteration protocols</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\\\">Strict mode</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode\\\">Transitioning to strict mode</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Template_literals\\\">Template literals</a></li>\\n <li><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features\\\">Deprecated features</a></li>\\n </ol>\\n </details>\\n </li>\\n </ol>\\n\",\"tocHTML\":\"<li><a href=\\\"#Tutorials\\\" rel=\\\"internal\\\">Tutorials</a><li><a href=\\\"#Reference\\\" rel=\\\"internal\\\">Reference</a><li><a href=\\\"#Tools_resources\\\" rel=\\\"internal\\\">Tools &amp; resources</a>\",\"raw\":\"<div>{{JsSidebar}}</div>\\n\\n<p class=\\\"summary\\\"><span class=\\\"seoSummary\\\"><strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a href=\\\"https://en.wikipedia.org/wiki/Just-in-time_compilation\\\">just-in-time</a> compiled programming language with {{Glossary(\\\"First-class Function\\\", \\\"first-class functions\\\")}}. While it is most well-known as the scripting language for Web pages, <a class=\\\"external\\\" href=\\\"https://en.wikipedia.org/wiki/JavaScript#Uses_outside_Web_pages\\\">many non-browser environments</a> also use it, such as {{Glossary(\\\"Node.js\\\")}}, <a class=\\\"external\\\" href=\\\"https://couchdb.apache.org/\\\">Apache CouchDB</a> and <a class=\\\"external\\\" href=\\\"http://www.adobe.com/devnet/acrobat/javascript.html\\\">Adobe Acrobat</a>.</span> JavaScript is a {{Glossary(\\\"Prototype-based programming\\\", \\\"prototype-based\\\")}}, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more <a href=\\\"/en-US/docs/Web/JavaScript/About_JavaScript\\\">about JavaScript</a>.</p>\\n\\n<p>This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. For information about {{Glossary(\\\"API\\\",\\\"APIs\\\")}} specific to Web pages, please see <a href=\\\"/en-US/docs/Web/API\\\">Web APIs</a> and {{Glossary(\\\"DOM\\\")}}.</p>\\n\\n<p>The standard for JavaScript is <a href=\\\"/en-US/docs/Web/JavaScript/Language_Resources\\\">ECMAScript</a>. As of 2012, all <a href=\\\"https://kangax.github.io/compat-table/es5/\\\">modern browsers</a> fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On June 17, 2015, <a href=\\\"https://www.ecma-international.org\\\">ECMA International</a> published the sixth major version of ECMAScript, which is officially called ECMAScript 2015, and was initially referred to as ECMAScript 6 or ES6. Since then, ECMAScript standards are on yearly release cycles. This documentation refers to the latest draft version, which is currently <a href=\\\"https://tc39.github.io/ecma262/\\\">ECMAScript 2020</a>.</p>\\n\\n<p>Do not confuse JavaScript with the <a href=\\\"https://en.wikipedia.org/wiki/Java_(programming_language)\\\">Java programming language</a>. Both \\\"Java\\\" and \\\"JavaScript\\\" are trademarks or registered trademarks of Oracle in the U.S. and other countries. However, the two programming languages have very different syntax, semantics, and uses.</p>\\n\\n<div class=\\\"column-container\\\">\\n<div class=\\\"column-half\\\">\\n<h2 id=\\\"Tutorials\\\">Tutorials</h2>\\n\\n<p>Learn how to program in JavaScript with guides and tutorials.</p>\\n\\n<h3 id=\\\"For_complete_beginners\\\">For complete beginners</h3>\\n\\n<p>Head over to our <a href=\\\"/en-US/docs/Learn/JavaScript\\\">Learning Area JavaScript topic</a> if you want to learn JavaScript but have no previous experience of JavaScript or programming. The complete modules available there are as follows:</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/First_steps\\\">JavaScript first steps</a></dt>\\n <dd>Answers some fundamental questions such as \\\"what is JavaScript?\\\", \\\"what does it look like?\\\", and \\\"what can it do?\\\", along with discussing key JavaScript features such as variables, strings, numbers, and arrays.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Building_blocks\\\">JavaScript building blocks</a></dt>\\n <dd>Continues our coverage of JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Objects\\\">Introducing JavaScript objects</a></dt>\\n <dd>The object-oriented nature of JavaScript is important to understand if you want to go further with your knowledge of the language and write more efficient code, therefore we've provided this module to help you.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Asynchronous\\\">Asynchronous JavaScript</a></dt>\\n <dd>Discusses asynchronous JavaScript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.</dd>\\n <dt><a href=\\\"/en-US/docs/Learn/JavaScript/Client-side_web_APIs\\\">Client-side web APIs</a></dt>\\n <dd>Explores what APIs are, and how to use some of the most common APIs you'll come across often in your development work.</dd>\\n</dl>\\n\\n<h3 id=\\\"JavaScript_guide\\\">JavaScript guide</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Guide\\\">JavaScript Guide</a></dt>\\n <dd>A much more detailed guide to the JavaScript language, aimed at those with previous programming experience either in JavaScript or another language.</dd>\\n</dl>\\n\\n<h3 id=\\\"Intermediate\\\">Intermediate</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks\\\">Understanding client-side JavaScript frameworks</a></dt>\\n <dd>JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. This module gives you some fundamental background knowledge about how client-side frameworks work and how they fit into your toolset, before moving on to tutorial series covering some of today's most popular ones.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript\\\">A re-introduction to JavaScript</a></dt>\\n <dd>An overview for those who <em>think</em> they know about JavaScript.</dd>\\n</dl>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Data_structures\\\">JavaScript data structures</a></dt>\\n <dd>Overview of available data structures in JavaScript.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness\\\">Equality comparisons and sameness</a></dt>\\n <dd>JavaScript provides three different value-comparison operations: strict equality using <code>===</code>, loose equality using <code>==</code>, and the {{jsxref(\\\"Global_Objects/Object/is\\\", \\\"Object.is()\\\")}} method.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Closures\\\">Closures</a></dt>\\n <dd>\\n <p>A closure is the combination of a function and the lexical environment within which that function was declared.</p>\\n </dd>\\n</dl>\\n\\n<h3 id=\\\"Advanced\\\">Advanced</h3>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain\\\">Inheritance and the prototype chain</a></dt>\\n <dd>Explanation of the widely misunderstood and under-estimated prototype-based inheritance.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Strict_mode\\\">Strict mode</a></dt>\\n <dd>Strict mode defines that you can not use any variable before initializing it. It is a restricted variant of ECMAScript 5, for faster performance and easier debugging.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Typed_arrays\\\">JavaScript typed arrays</a></dt>\\n <dd>JavaScript typed arrays provide a mechanism for accessing raw binary data.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Memory_Management\\\">Memory Management</a></dt>\\n <dd>Memory life cycle and garbage collection in JavaScript.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/EventLoop\\\">Concurrency model and Event Loop</a></dt>\\n <dd>JavaScript has a concurrency model based on an \\\"event loop\\\".</dd>\\n</dl>\\n</div>\\n\\n<div class=\\\"column-half\\\">\\n<h2 id=\\\"Reference\\\">Reference</h2>\\n\\n<p>Browse the complete <a href=\\\"/en-US/docs/Web/JavaScript/Reference\\\">JavaScript reference</a> documentation.</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Global_Objects\\\">Standard objects</a></dt>\\n <dd>Get to know standard built-in objects {{jsxref(\\\"Array\\\")}}, {{jsxref(\\\"Boolean\\\")}}, {{jsxref(\\\"Date\\\")}}, {{jsxref(\\\"Error\\\")}}, {{jsxref(\\\"Function\\\")}}, {{jsxref(\\\"JSON\\\")}}, {{jsxref(\\\"Math\\\")}}, {{jsxref(\\\"Number\\\")}}, {{jsxref(\\\"Object\\\")}}, {{jsxref(\\\"RegExp\\\")}}, {{jsxref(\\\"String\\\")}}, {{jsxref(\\\"Map\\\")}}, {{jsxref(\\\"Set\\\")}}, {{jsxref(\\\"WeakMap\\\")}}, {{jsxref(\\\"WeakSet\\\")}}, and others.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators\\\">Expressions and operators</a></dt>\\n <dd>Learn more about the behavior of JavaScript's operators {{jsxref(\\\"Operators/instanceof\\\", \\\"instanceof\\\")}}, {{jsxref(\\\"Operators/typeof\\\", \\\"typeof\\\")}}, {{jsxref(\\\"Operators/new\\\", \\\"new\\\")}}, {{jsxref(\\\"Operators/this\\\", \\\"this\\\")}}, the <a href=\\\"/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence\\\">operator precedence</a>, and more.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Statements\\\">Statements and declarations</a></dt>\\n <dd>Learn how {{jsxref(\\\"Statements/do...while\\\", \\\"do-while\\\")}}, {{jsxref(\\\"Statements/for...in\\\", \\\"for-in\\\")}}, {{jsxref(\\\"Statements/for...of\\\", \\\"for-of\\\")}}, {{jsxref(\\\"Statements/try...catch\\\", \\\"try-catch\\\")}}, {{jsxref(\\\"Statements/let\\\", \\\"let\\\")}}, {{jsxref(\\\"Statements/var\\\", \\\"var\\\")}}, {{jsxref(\\\"Statements/const\\\", \\\"const\\\")}}, {{jsxref(\\\"Statements/if...else\\\", \\\"if-else\\\")}}, {{jsxref(\\\"Statements/switch\\\", \\\"switch\\\")}}, and more JavaScript statements and keywords work.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Reference/Functions\\\">Functions</a></dt>\\n <dd>Learn how to work with JavaScript's functions to develop your applications.</dd>\\n</dl>\\n\\n<h2 id=\\\"Tools_resources\\\">Tools &amp; resources</h2>\\n\\n<p>Helpful tools for writing and debugging your <strong>JavaScript </strong>code.</p>\\n\\n<dl>\\n <dt><a href=\\\"/en-US/docs/Tools\\\">Firefox Developer Tools</a></dt>\\n <dd><a href=\\\"/en-US/docs/Tools/Web_Console\\\">Web Console</a>, <a href=\\\"/en-US/docs/Tools/Profiler\\\">JavaScript Profiler</a>, <a href=\\\"/en-US/docs/Tools/Debugger\\\">Debugger</a>, and more.</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/Shells\\\">JavaScript Shells</a></dt>\\n <dd>A JavaScript shell allows you to quickly test snippets of JavaScript code.</dd>\\n <dt><a href=\\\"https://learnjavascript.online/\\\">Learn JavaScript</a></dt>\\n <dd>An excellent resource for aspiring web developers \u2014 Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.</dd>\\n <dt><a href=\\\"https://togetherjs.com/\\\">TogetherJS</a></dt>\\n <dd>Collaboration made easy. By adding TogetherJS to your site, your users can help each other out on a website in real-time!</dd>\\n <dt><a href=\\\"https://stackoverflow.com/questions/tagged/javascript\\\">Stack Overflow</a></dt>\\n <dd>Stack Overflow questions tagged with \\\"JavaScript\\\".</dd>\\n <dt><a href=\\\"/en-US/docs/Web/JavaScript/New_in_JavaScript\\\">JavaScript versions and release notes</a></dt>\\n <dd>Browse JavaScript's feature history and implementation status.</dd>\\n <dt><a href=\\\"https://jsfiddle.net/\\\">JSFiddle</a></dt>\\n <dd>Edit JavaScript, CSS, HTML and get live results. Use external resources and collaborate with your team online.</dd>\\n <dt><a href=\\\"https://plnkr.co/\\\">Plunker</a></dt>\\n <dd>Plunker is an online community for creating, collaborating on and sharing your web development ideas. Edit your JavaScript, CSS, HTML files and get live results and file structure.</dd>\\n <dt><a href=\\\"https://jsbin.com/\\\">JSBin</a></dt>\\n <dd>\\n <p>JS Bin is an open-source collaborative web development debugging tool.</p>\\n </dd>\\n <dt><a href=\\\"https://codepen.io/\\\">Codepen</a></dt>\\n <dd>\\n <p>Codepen is another collaborative web development tool used as a live result playground.</p>\\n </dd>\\n <dt><a href=\\\"https://stackblitz.com/\\\">StackBlitz</a></dt>\\n <dd>\\n <p>StackBlitz is another online playground/debugging tool, which can host and deploy full-stack applications using React, Angular, etc.</p>\\n </dd>\\n</dl>\\n</div>\\n</div>\",\"parents\":[{\"url\":\"/en-US/docs/Web\",\"title\":\"Web technology for developers\"}],\"translations\":[{\"language\":\"\u0639\u0631\u0628\u064A\",\"hrefLang\":\"ar\",\"localizedLanguage\":\"Arabic\",\"locale\":\"ar\",\"url\":\"/ar/docs/Web/JavaScript\",\"title\":\"\u062C\u0627\u0641\u0627\u0633\u0643\u0631\u0628\u062A\"},{\"language\":\"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438\",\"hrefLang\":\"bg\",\"localizedLanguage\":\"Bulgarian\",\"locale\":\"bg\",\"url\":\"/bg/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u09AC\u09BE\u0982\u09B2\u09BE\",\"hrefLang\":\"bn\",\"localizedLanguage\":\"Bengali\",\"locale\":\"bn\",\"url\":\"/bn/docs/Web/JavaScript\",\"title\":\"\u099C\u09BE\u09AD\u09BE\u09B8\u09CD\u0995\u09CD\u09B0\u09BF\u09AA\u09CD\u099F\"},{\"language\":\"Catal\u00E0\",\"hrefLang\":\"ca\",\"localizedLanguage\":\"Catalan\",\"locale\":\"ca\",\"url\":\"/ca/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Deutsch\",\"hrefLang\":\"de\",\"localizedLanguage\":\"German\",\"locale\":\"de\",\"url\":\"/de/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\",\"hrefLang\":\"el\",\"localizedLanguage\":\"Greek\",\"locale\":\"el\",\"url\":\"/el/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Espa\u00F1ol\",\"hrefLang\":\"es\",\"localizedLanguage\":\"Spanish\",\"locale\":\"es\",\"url\":\"/es/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0641\u0627\u0631\u0633\u06CC\",\"hrefLang\":\"fa\",\"localizedLanguage\":\"Persian\",\"locale\":\"fa\",\"url\":\"/fa/docs/Web/JavaScript\",\"title\":\"\u062C\u0627\u0648\u0627 \u0627\u0633\u06A9\u0631\u06CC\u067E\u062A\"},{\"language\":\"suomi\",\"hrefLang\":\"fi\",\"localizedLanguage\":\"Finnish\",\"locale\":\"fi\",\"url\":\"/fi/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Fran\u00E7ais\",\"hrefLang\":\"fr\",\"localizedLanguage\":\"French\",\"locale\":\"fr\",\"url\":\"/fr/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u05E2\u05D1\u05E8\u05D9\u05EA\",\"hrefLang\":\"he\",\"localizedLanguage\":\"Hebrew\",\"locale\":\"he\",\"url\":\"/he/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0939\u093F\u0928\u094D\u0926\u0940 (\u092D\u093E\u0930\u0924)\",\"hrefLang\":\"hi\",\"localizedLanguage\":\"Hindi (India)\",\"locale\":\"hi-IN\",\"url\":\"/hi-IN/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"magyar\",\"hrefLang\":\"hu\",\"localizedLanguage\":\"Hungarian\",\"locale\":\"hu\",\"url\":\"/hu/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Bahasa Indonesia\",\"hrefLang\":\"id\",\"localizedLanguage\":\"Indonesian\",\"locale\":\"id\",\"url\":\"/id/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Italiano\",\"hrefLang\":\"it\",\"localizedLanguage\":\"Italian\",\"locale\":\"it\",\"url\":\"/it/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u65E5\u672C\u8A9E\",\"hrefLang\":\"ja\",\"localizedLanguage\":\"Japanese\",\"locale\":\"ja\",\"url\":\"/ja/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Taqbaylit\",\"hrefLang\":\"kab\",\"localizedLanguage\":\"Kabyle\",\"locale\":\"kab\",\"url\":\"/kab/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\uD55C\uAD6D\uC5B4\",\"hrefLang\":\"ko\",\"localizedLanguage\":\"Korean\",\"locale\":\"ko\",\"url\":\"/ko/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\",\"hrefLang\":\"my\",\"localizedLanguage\":\"Burmese\",\"locale\":\"my\",\"url\":\"/my/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Nederlands\",\"hrefLang\":\"nl\",\"localizedLanguage\":\"Dutch\",\"locale\":\"nl\",\"url\":\"/nl/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Polski\",\"hrefLang\":\"pl\",\"localizedLanguage\":\"Polish\",\"locale\":\"pl\",\"url\":\"/pl/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Portugu\u00EAs (do\u00A0Brasil)\",\"hrefLang\":\"pt-BR\",\"localizedLanguage\":\"Portuguese (Brazilian)\",\"locale\":\"pt-BR\",\"url\":\"/pt-BR/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Portugu\u00EAs (Europeu)\",\"hrefLang\":\"pt\",\"localizedLanguage\":\"Portuguese (Portugal)\",\"locale\":\"pt-PT\",\"url\":\"/pt-PT/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0420\u0443\u0441\u0441\u043A\u0438\u0439\",\"hrefLang\":\"ru\",\"localizedLanguage\":\"Russian\",\"locale\":\"ru\",\"url\":\"/ru/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Svenska\",\"hrefLang\":\"sv\",\"localizedLanguage\":\"Swedish\",\"locale\":\"sv-SE\",\"url\":\"/sv-SE/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0E44\u0E17\u0E22\",\"hrefLang\":\"th\",\"localizedLanguage\":\"Thai\",\"locale\":\"th\",\"url\":\"/th/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"T\u00FCrk\u00E7e\",\"hrefLang\":\"tr\",\"localizedLanguage\":\"Turkish\",\"locale\":\"tr\",\"url\":\"/tr/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430\",\"hrefLang\":\"uk\",\"localizedLanguage\":\"Ukrainian\",\"locale\":\"uk\",\"url\":\"/uk/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"Ti\u1EBFng Vi\u1EC7t\",\"hrefLang\":\"vi\",\"localizedLanguage\":\"Vietnamese\",\"locale\":\"vi\",\"url\":\"/vi/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u4E2D\u6587 (\u7B80\u4F53)\",\"hrefLang\":\"zh\",\"localizedLanguage\":\"Chinese (Simplified)\",\"locale\":\"zh-CN\",\"url\":\"/zh-CN/docs/Web/JavaScript\",\"title\":\"JavaScript\"},{\"language\":\"\u6B63\u9AD4\u4E2D\u6587 (\u7E41\u9AD4)\",\"hrefLang\":\"zh-TW\",\"localizedLanguage\":\"Chinese (Traditional)\",\"locale\":\"zh-TW\",\"url\":\"/zh-TW/docs/Web/JavaScript\",\"title\":\"JavaScript\"}],\"lastModified\":\"2020-06-07T00:02:58.233403\"}}");</script>
<div id="auth-modal" class="modal hidden">
<section class="auth-providers" tabindex="-1" role="dialog" aria-modal="true"
aria-labelledby="modal-main-heading">
<header>
<h2 id="modal-main-heading">Sign In</h2>
</header>
<p>
Sign in to enjoy the benefits of an MDN account. If you haven’t already created an account, you will be prompted to do so after signing in.
</p>
<div class="auth-button-container">
<a href="/users/github/login/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript" class="github-auth" data-first-focusable="true">
Sign in with Github
</a>
<a href="/users/google/login/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript" class="google-auth">
Sign in with Google
</a>
</div>
<button id="close-modal" class="close-modal" data-last-focusable="true">
<span>Close modal</span>
</button>
</section>
</div>
<!-- site js -->
<script defer type="text/javascript" src="/static/build/js/react-main.7daa8dfb7ed0.js" charset="utf-8"></script>
<script defer type="text/javascript" src="/static/build/js/mathml.3cb4c04c0706.js" charset="utf-8"></script>
<script defer type="text/javascript" src="/static/build/js/auth-modal.119e5d70465f.js" charset="utf-8"></script>
<script defer type="text/javascript" src="/static/build/js/react-bcd-signal.0124e23c0b7b.js" charset="utf-8"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment