CINXE.COM
Javascript – Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="sv" dir="ltr"> <head> <meta charset="UTF-8"> <title>Javascript – Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )svwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":[",\t."," \t,"],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"dmy","wgMonthNames":["","januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],"wgRequestId":"12e7750c-14a4-407f-9a3c-165871cc6a3a","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Javascript","wgTitle":"Javascript","wgCurRevisionId":56268866,"wgRevisionId":56268866,"wgArticleId":41631,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Artiklar som behöver fler källor 2018-04","Alla artiklar som behöver fler källor","Alla artiklar som behöver källor","Javascript","Prototyp-baserade programspråk","Objekt-baserade programspråk","Domänspecifika programspråk"],"wgPageViewLanguage":"sv","wgPageContentLanguage":"sv","wgPageContentModel":"wikitext","wgRelevantPageName":"Javascript","wgRelevantArticleId":41631,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit": [],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"sv","pageLanguageDir":"ltr","pageVariantFallbacks":"sv"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":9000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q2005","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false, "wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.babel":"ready","ext.gadget.geo":"ready","ext.gadget.warnings":"ready","ext.gadget.tags":"ready","ext.gadget.error":"ready","ext.gadget.referenser":"ready","ext.gadget.printonly":"ready","ext.gadget.tables":"ready","ext.gadget.toccolours":"ready","ext.gadget.smallTagFontSize":"ready","ext.gadget.videoPlayButton":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site", "mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.editsection0","ext.gadget.ProtectionIndicators","ext.gadget.GeoboxLocatorMulti","ext.gadget.InterwikiBadges","ext.gadget.collapsibleTables","ext.gadget.NewSection","ext.gadget.ExkluderaRobotskapadeSidor","ext.gadget.Nearby","ext.gadget.InterProjectLinks","ext.gadget.cgiircbox","ext.gadget.withJS","ext.gadget.CommonsFileLinks","ext.gadget.tableSorterCollation","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=sv&modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=sv&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=sv&modules=ext.gadget.babel%2Cerror%2Cgeo%2Cprintonly%2Creferenser%2CsmallTagFontSize%2Ctables%2Ctags%2Ctoccolours%2CvideoPlayButton%2Cwarnings&only=styles&skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=sv&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Javascript – Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//sv.m.wikipedia.org/wiki/Javascript"> <link rel="alternate" type="application/x-wiki" title="Redigera" href="/w/index.php?title=Javascript&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (sv)"> <link rel="EditURI" type="application/rsd+xml" href="//sv.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://sv.wikipedia.org/wiki/Javascript"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.sv"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom-flöde" href="/w/index.php?title=Special:Senaste_%C3%A4ndringar&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Javascript rootpage-Javascript skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Hoppa till innehållet</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Webbplats"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Huvudmeny" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Huvudmeny</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Huvudmeny</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">flytta till sidofältet</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">dölj</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigering </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Portal:Huvudsida" title="Besök huvudsidan [z]" accesskey="z"><span>Huvudsida</span></a></li><li id="n-Introduktion" class="mw-list-item"><a href="/wiki/Wikipedia:Introduktion"><span>Introduktion</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Deltagarportalen" title="Om projektet, vad du kan göra, var man kan hitta saker"><span>Deltagarportalen</span></a></li><li id="n-Bybrunnen" class="mw-list-item"><a href="/wiki/Wikipedia:Bybrunnen"><span>Bybrunnen</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:Senaste_%C3%A4ndringar" title="Lista över de senaste ändringarna på wikin [r]" accesskey="r"><span>Senaste ändringarna</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Slumpsida" title="Gå till en slumpmässigt vald sida [x]" accesskey="x"><span>Slumpartikel</span></a></li><li id="n-filuppladdning" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard" title="Ladda upp filer till Wikimedia Commons"><span>Ladda upp filer</span></a></li><li id="n-Kontakta-Wikipedia" class="mw-list-item"><a href="/wiki/Wikipedia:Kontakt"><span>Kontakta Wikipedia</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Wikipedia:Hj%C3%A4lp" title="Platsen där du hittar hjälp"><span>Hjälp</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Portal:Huvudsida" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikipedia-tagline-sv.svg" width="120" height="13" style="width: 7.5em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:S%C3%B6k" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Sök i svenskspråkiga Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Sök</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Sök på Wikipedia" aria-label="Sök på Wikipedia" autocapitalize="sentences" title="Sök i svenskspråkiga Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Sök"> </div> <button class="cdx-button cdx-search-input__end-button">Sök</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personliga verktyg"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Utseende"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Ändra utseendet på sidans teckenstorlek, bredd och färg" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Utseende" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Utseende</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_sv.wikipedia.org&uselang=sv" class=""><span>Stöd Wikipedia</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:Skapa_konto&returnto=Javascript" title="Du uppmuntras att skapa ett konto och logga in, men det är inte obligatoriskt" class=""><span>Skapa konto</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:Inloggning&returnto=Javascript" title="Inloggning ger tillgång till fler funktioner för den som vill skriva och redigera artiklar. [o]" accesskey="o" class=""><span>Logga in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Fler alternativ" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personliga verktyg" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personliga verktyg</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Användarmeny" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_sv.wikipedia.org&uselang=sv"><span>Stöd Wikipedia</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:Skapa_konto&returnto=Javascript" title="Du uppmuntras att skapa ett konto och logga in, men det är inte obligatoriskt"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Skapa konto</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:Inloggning&returnto=Javascript" title="Inloggning ger tillgång till fler funktioner för den som vill skriva och redigera artiklar. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Logga in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Sidor för utloggade redigerare <a href="/wiki/Hj%C3%A4lp:Introduktion" aria-label="Läs mer om redigering"><span>läs mer</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:Mina_bidrag" title="En lista över redigeringar från denna IP-adress [y]" accesskey="y"><span>Bidrag</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:Min_diskussion" title="Diskussion om redigeringar från det här IP-numret [n]" accesskey="n"><span>Diskussion</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Webbplats"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Innehåll" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Innehåll</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">flytta till sidofältet</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">dölj</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Inledning</div> </a> </li> <li id="toc-Historia_och_namngivning" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Historia_och_namngivning"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Historia och namngivning</span> </div> </a> <ul id="toc-Historia_och_namngivning-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Kodexempel" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Kodexempel"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Kodexempel</span> </div> </a> <button aria-controls="toc-Kodexempel-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Växla underavsnittet Kodexempel</span> </button> <ul id="toc-Kodexempel-sublist" class="vector-toc-list"> <li id="toc-Async/Await_och_löften" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Async/Await_och_löften"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Async/Await och löften</span> </div> </a> <ul id="toc-Async/Await_och_löften-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Syntax" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Syntax"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Syntax</span> </div> </a> <ul id="toc-Syntax-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Skriptbibliotek_och_ramverk" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Skriptbibliotek_och_ramverk"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Skriptbibliotek och ramverk</span> </div> </a> <button aria-controls="toc-Skriptbibliotek_och_ramverk-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Växla underavsnittet Skriptbibliotek och ramverk</span> </button> <ul id="toc-Skriptbibliotek_och_ramverk-sublist" class="vector-toc-list"> <li id="toc-Lista_på_några_Javascript-bibliotek_och_ramverk" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Lista_på_några_Javascript-bibliotek_och_ramverk"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Lista på några Javascript-bibliotek och ramverk</span> </div> </a> <ul id="toc-Lista_på_några_Javascript-bibliotek_och_ramverk-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Liknande_programspråk" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Liknande_programspråk"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Liknande programspråk</span> </div> </a> <ul id="toc-Liknande_programspråk-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Se_även" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Se_även"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Se även</span> </div> </a> <ul id="toc-Se_även-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Källor" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Källor"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Källor</span> </div> </a> <ul id="toc-Källor-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Externa_länkar" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Externa_länkar"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Externa länkar</span> </div> </a> <ul id="toc-Externa_länkar-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Innehåll" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Växla innehållsförteckningen" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Växla innehållsförteckningen</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Javascript</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Gå till en artikel på ett annat språk. Tillgänglig på 109 språk" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-109" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">109 språk</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/JavaScript" title="JavaScript – afrikaans" lang="af" hreflang="af" data-title="JavaScript" data-language-autonym="Afrikaans" data-language-local-name="afrikaans" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-ang mw-list-item"><a href="https://ang.wikipedia.org/wiki/JavaScript" title="JavaScript – fornengelska" lang="ang" hreflang="ang" data-title="JavaScript" data-language-autonym="Ænglisc" data-language-local-name="fornengelska" class="interlanguage-link-target"><span>Ænglisc</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AC%D8%A7%D9%81%D8%A7_%D8%B3%D9%83%D8%B1%D9%8A%D8%A8%D8%AA" title="جافا سكريبت – arabiska" lang="ar" hreflang="ar" data-title="جافا سكريبت" data-language-autonym="العربية" data-language-local-name="arabiska" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-an mw-list-item"><a href="https://an.wikipedia.org/wiki/JavaScript" title="JavaScript – aragonesiska" lang="an" hreflang="an" data-title="JavaScript" data-language-autonym="Aragonés" data-language-local-name="aragonesiska" class="interlanguage-link-target"><span>Aragonés</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/JavaScript" title="JavaScript – asturiska" lang="ast" hreflang="ast" data-title="JavaScript" data-language-autonym="Asturianu" data-language-local-name="asturiska" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/JavaScript" title="JavaScript – azerbajdzjanska" lang="az" hreflang="az" data-title="JavaScript" data-language-autonym="Azərbaycanca" data-language-local-name="azerbajdzjanska" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-azb mw-list-item"><a href="https://azb.wikipedia.org/wiki/%D8%AC%D8%A7%D9%88%D8%A7%D8%A7%D8%B3%DA%A9%D8%B1%DB%8C%D9%BE%D8%AA" title="جاوااسکریپت – South Azerbaijani" lang="azb" hreflang="azb" data-title="جاوااسکریپت" data-language-autonym="تۆرکجه" data-language-local-name="South Azerbaijani" class="interlanguage-link-target"><span>تۆرکجه</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%9C%E0%A6%BE%E0%A6%AD%E0%A6%BE%E0%A6%B8%E0%A7%8D%E0%A6%95%E0%A7%8D%E0%A6%B0%E0%A6%BF%E0%A6%AA%E0%A7%8D%E0%A6%9F" title="জাভাস্ক্রিপ্ট – bengali" lang="bn" hreflang="bn" data-title="জাভাস্ক্রিপ্ট" data-language-autonym="বাংলা" data-language-local-name="bengali" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/JavaScript" title="JavaScript – min nan" lang="nan" hreflang="nan" data-title="JavaScript" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="min nan" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/JavaScript" title="JavaScript – belarusiska" lang="be" hreflang="be" data-title="JavaScript" data-language-autonym="Беларуская" data-language-local-name="belarusiska" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://be-tarask.wikipedia.org/wiki/JavaScript" title="JavaScript – belarusiska (tarasjkevitsa)" lang="be-tarask" hreflang="be-tarask" data-title="JavaScript" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="belarusiska (tarasjkevitsa)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/JavaScript" title="JavaScript – bulgariska" lang="bg" hreflang="bg" data-title="JavaScript" data-language-autonym="Български" data-language-local-name="bulgariska" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-br mw-list-item"><a href="https://br.wikipedia.org/wiki/Javascript" title="Javascript – bretonska" lang="br" hreflang="br" data-title="Javascript" data-language-autonym="Brezhoneg" data-language-local-name="bretonska" class="interlanguage-link-target"><span>Brezhoneg</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/JavaScript" title="JavaScript – katalanska" lang="ca" hreflang="ca" data-title="JavaScript" data-language-autonym="Català" data-language-local-name="katalanska" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/JavaScript" title="JavaScript – tjuvasjiska" lang="cv" hreflang="cv" data-title="JavaScript" data-language-autonym="Чӑвашла" data-language-local-name="tjuvasjiska" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/JavaScript" title="JavaScript – tjeckiska" lang="cs" hreflang="cs" data-title="JavaScript" data-language-autonym="Čeština" data-language-local-name="tjeckiska" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/JavaScript" title="JavaScript – danska" lang="da" hreflang="da" data-title="JavaScript" data-language-autonym="Dansk" data-language-local-name="danska" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/JavaScript" title="JavaScript – tyska" lang="de" hreflang="de" data-title="JavaScript" data-language-autonym="Deutsch" data-language-local-name="tyska" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/JavaScript" title="JavaScript – estniska" lang="et" hreflang="et" data-title="JavaScript" data-language-autonym="Eesti" data-language-local-name="estniska" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/JavaScript" title="JavaScript – grekiska" lang="el" hreflang="el" data-title="JavaScript" data-language-autonym="Ελληνικά" data-language-local-name="grekiska" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/JavaScript" title="JavaScript – engelska" lang="en" hreflang="en" data-title="JavaScript" data-language-autonym="English" data-language-local-name="engelska" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/JavaScript" title="JavaScript – spanska" lang="es" hreflang="es" data-title="JavaScript" data-language-autonym="Español" data-language-local-name="spanska" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/JavaScript" title="JavaScript – esperanto" lang="eo" hreflang="eo" data-title="JavaScript" data-language-autonym="Esperanto" data-language-local-name="esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/JavaScript" title="JavaScript – baskiska" lang="eu" hreflang="eu" data-title="JavaScript" data-language-autonym="Euskara" data-language-local-name="baskiska" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AC%D8%A7%D9%88%D8%A7%D8%A7%D8%B3%DA%A9%D8%B1%DB%8C%D9%BE%D8%AA" title="جاوااسکریپت – persiska" lang="fa" hreflang="fa" data-title="جاوااسکریپت" data-language-autonym="فارسی" data-language-local-name="persiska" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/JavaScript" title="JavaScript – franska" lang="fr" hreflang="fr" data-title="JavaScript" data-language-autonym="Français" data-language-local-name="franska" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/JavaScript" title="JavaScript – galiciska" lang="gl" hreflang="gl" data-title="JavaScript" data-language-autonym="Galego" data-language-local-name="galiciska" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-hak mw-list-item"><a href="https://hak.wikipedia.org/wiki/JavaScript" title="JavaScript – hakka" lang="hak" hreflang="hak" data-title="JavaScript" data-language-autonym="客家語 / Hak-kâ-ngî" data-language-local-name="hakka" class="interlanguage-link-target"><span>客家語 / Hak-kâ-ngî</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8" title="자바스크립트 – koreanska" lang="ko" hreflang="ko" data-title="자바스크립트" data-language-autonym="한국어" data-language-local-name="koreanska" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ha mw-list-item"><a href="https://ha.wikipedia.org/wiki/JavaScript" title="JavaScript – hausa" lang="ha" hreflang="ha" data-title="JavaScript" data-language-autonym="Hausa" data-language-local-name="hausa" class="interlanguage-link-target"><span>Hausa</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D5%8B%D5%A1%D5%BE%D5%A1%D5%8D%D5%AF%D6%80%D5%AB%D5%BA%D5%BF" title="ՋավաՍկրիպտ – armeniska" lang="hy" hreflang="hy" data-title="ՋավաՍկրիպտ" data-language-autonym="Հայերեն" data-language-local-name="armeniska" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%9C%E0%A4%BE%E0%A4%B5%E0%A4%BE%E0%A4%B8%E0%A5%8D%E0%A4%95%E0%A5%8D%E0%A4%B0%E0%A4%BF%E0%A4%AA%E0%A5%8D%E0%A4%9F" title="जावास्क्रिप्ट – hindi" lang="hi" hreflang="hi" data-title="जावास्क्रिप्ट" data-language-autonym="हिन्दी" data-language-local-name="hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/JavaScript" title="JavaScript – kroatiska" lang="hr" hreflang="hr" data-title="JavaScript" data-language-autonym="Hrvatski" data-language-local-name="kroatiska" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/JavaScript" title="JavaScript – ido" lang="io" hreflang="io" data-title="JavaScript" data-language-autonym="Ido" data-language-local-name="ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/JavaScript" title="JavaScript – indonesiska" lang="id" hreflang="id" data-title="JavaScript" data-language-autonym="Bahasa Indonesia" data-language-local-name="indonesiska" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ia mw-list-item"><a href="https://ia.wikipedia.org/wiki/JavaScript" title="JavaScript – interlingua" lang="ia" hreflang="ia" data-title="JavaScript" data-language-autonym="Interlingua" data-language-local-name="interlingua" class="interlanguage-link-target"><span>Interlingua</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/JavaScript" title="JavaScript – isländska" lang="is" hreflang="is" data-title="JavaScript" data-language-autonym="Íslenska" data-language-local-name="isländska" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/JavaScript" title="JavaScript – italienska" lang="it" hreflang="it" data-title="JavaScript" data-language-autonym="Italiano" data-language-local-name="italienska" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/JavaScript" title="JavaScript – hebreiska" lang="he" hreflang="he" data-title="JavaScript" data-language-autonym="עברית" data-language-local-name="hebreiska" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-jv mw-list-item"><a href="https://jv.wikipedia.org/wiki/JavaScript" title="JavaScript – javanesiska" lang="jv" hreflang="jv" data-title="JavaScript" data-language-autonym="Jawa" data-language-local-name="javanesiska" class="interlanguage-link-target"><span>Jawa</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/JavaScript" title="JavaScript – georgiska" lang="ka" hreflang="ka" data-title="JavaScript" data-language-autonym="ქართული" data-language-local-name="georgiska" class="interlanguage-link-target"><span>ქართული</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/JavaScript" title="JavaScript – kazakiska" lang="kk" hreflang="kk" data-title="JavaScript" data-language-autonym="Қазақша" data-language-local-name="kazakiska" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-sw mw-list-item"><a href="https://sw.wikipedia.org/wiki/JavaScript" title="JavaScript – swahili" lang="sw" hreflang="sw" data-title="JavaScript" data-language-autonym="Kiswahili" data-language-local-name="swahili" class="interlanguage-link-target"><span>Kiswahili</span></a></li><li class="interlanguage-link interwiki-ku mw-list-item"><a href="https://ku.wikipedia.org/wiki/JavaScript" title="JavaScript – kurdiska" lang="ku" hreflang="ku" data-title="JavaScript" data-language-autonym="Kurdî" data-language-local-name="kurdiska" class="interlanguage-link-target"><span>Kurdî</span></a></li><li class="interlanguage-link interwiki-ky mw-list-item"><a href="https://ky.wikipedia.org/wiki/JavaScript" title="JavaScript – kirgiziska" lang="ky" hreflang="ky" data-title="JavaScript" data-language-autonym="Кыргызча" data-language-local-name="kirgiziska" class="interlanguage-link-target"><span>Кыргызча</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/JavaScript" title="JavaScript – latin" lang="la" hreflang="la" data-title="JavaScript" data-language-autonym="Latina" data-language-local-name="latin" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/JavaScript" title="JavaScript – lettiska" lang="lv" hreflang="lv" data-title="JavaScript" data-language-autonym="Latviešu" data-language-local-name="lettiska" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/JavaScript" title="JavaScript – litauiska" lang="lt" hreflang="lt" data-title="JavaScript" data-language-autonym="Lietuvių" data-language-local-name="litauiska" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lfn mw-list-item"><a href="https://lfn.wikipedia.org/wiki/JavaScript" title="JavaScript – lingua franca nova" lang="lfn" hreflang="lfn" data-title="JavaScript" data-language-autonym="Lingua Franca Nova" data-language-local-name="lingua franca nova" class="interlanguage-link-target"><span>Lingua Franca Nova</span></a></li><li class="interlanguage-link interwiki-lmo mw-list-item"><a href="https://lmo.wikipedia.org/wiki/JavaScript" title="JavaScript – lombardiska" lang="lmo" hreflang="lmo" data-title="JavaScript" data-language-autonym="Lombard" data-language-local-name="lombardiska" class="interlanguage-link-target"><span>Lombard</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/JavaScript" title="JavaScript – ungerska" lang="hu" hreflang="hu" data-title="JavaScript" data-language-autonym="Magyar" data-language-local-name="ungerska" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/JavaScript" title="JavaScript – makedonska" lang="mk" hreflang="mk" data-title="JavaScript" data-language-autonym="Македонски" data-language-local-name="makedonska" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%9C%E0%B4%BE%E0%B4%B5%E0%B4%BE%E0%B4%B8%E0%B5%8D%E0%B4%95%E0%B5%8D%E0%B4%B0%E0%B4%BF%E0%B4%AA%E0%B5%8D%E0%B4%B1%E0%B5%8D%E0%B4%B1%E0%B5%8D" title="ജാവാസ്ക്രിപ്റ്റ് – malayalam" lang="ml" hreflang="ml" data-title="ജാവാസ്ക്രിപ്റ്റ്" data-language-autonym="മലയാളം" data-language-local-name="malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%9C%E0%A4%BE%E0%A4%B5%E0%A4%BE%E0%A4%B8%E0%A5%8D%E0%A4%95%E0%A5%8D%E0%A4%B0%E0%A4%BF%E0%A4%AA%E0%A5%8D%E0%A4%9F" title="जावास्क्रिप्ट – marathi" lang="mr" hreflang="mr" data-title="जावास्क्रिप्ट" data-language-autonym="मराठी" data-language-local-name="marathi" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-arz mw-list-item"><a href="https://arz.wikipedia.org/wiki/%D8%AC%D8%A7%D9%81%D8%A7_%D8%B3%D9%83%D8%B1%D9%8A%D8%A8%D8%AA" title="جافا سكريبت – egyptisk arabiska" lang="arz" hreflang="arz" data-title="جافا سكريبت" data-language-autonym="مصرى" data-language-local-name="egyptisk arabiska" class="interlanguage-link-target"><span>مصرى</span></a></li><li class="interlanguage-link interwiki-mzn mw-list-item"><a href="https://mzn.wikipedia.org/wiki/%D8%AC%D8%A7%D9%88%D8%A7%D8%A7%D8%B3%DA%A9%D8%B1%DB%8C%D9%BE%D8%AA" title="جاوااسکریپت – mazanderani" lang="mzn" hreflang="mzn" data-title="جاوااسکریپت" data-language-autonym="مازِرونی" data-language-local-name="mazanderani" class="interlanguage-link-target"><span>مازِرونی</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/JavaScript" title="JavaScript – malajiska" lang="ms" hreflang="ms" data-title="JavaScript" data-language-autonym="Bahasa Melayu" data-language-local-name="malajiska" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-cdo mw-list-item"><a href="https://cdo.wikipedia.org/wiki/JavaScript" title="JavaScript – Mindong" lang="cdo" hreflang="cdo" data-title="JavaScript" data-language-autonym="閩東語 / Mìng-dĕ̤ng-ngṳ̄" data-language-local-name="Mindong" class="interlanguage-link-target"><span>閩東語 / Mìng-dĕ̤ng-ngṳ̄</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/JavaScript" title="JavaScript – mongoliska" lang="mn" hreflang="mn" data-title="JavaScript" data-language-autonym="Монгол" data-language-local-name="mongoliska" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikipedia.org/wiki/JavaScript" title="JavaScript – burmesiska" lang="my" hreflang="my" data-title="JavaScript" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="burmesiska" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/JavaScript" title="JavaScript – nederländska" lang="nl" hreflang="nl" data-title="JavaScript" data-language-autonym="Nederlands" data-language-local-name="nederländska" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ne mw-list-item"><a href="https://ne.wikipedia.org/wiki/%E0%A4%9C%E0%A4%BE%E0%A4%AD%E0%A4%BE%E0%A4%B8%E0%A5%8D%E0%A4%95%E0%A5%8D%E0%A4%B0%E0%A4%BF%E0%A4%AA%E0%A5%8D%E0%A4%9F" title="जाभास्क्रिप्ट – nepalesiska" lang="ne" hreflang="ne" data-title="जाभास्क्रिप्ट" data-language-autonym="नेपाली" data-language-local-name="nepalesiska" class="interlanguage-link-target"><span>नेपाली</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/JavaScript" title="JavaScript – japanska" lang="ja" hreflang="ja" data-title="JavaScript" data-language-autonym="日本語" data-language-local-name="japanska" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-frr mw-list-item"><a href="https://frr.wikipedia.org/wiki/JavaScript" title="JavaScript – nordfrisiska" lang="frr" hreflang="frr" data-title="JavaScript" data-language-autonym="Nordfriisk" data-language-local-name="nordfrisiska" class="interlanguage-link-target"><span>Nordfriisk</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/JavaScript" title="JavaScript – norskt bokmål" lang="nb" hreflang="nb" data-title="JavaScript" data-language-autonym="Norsk bokmål" data-language-local-name="norskt bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikipedia.org/wiki/%E0%AC%9C%E0%AC%BE%E0%AC%AD%E0%AC%BE%E0%AC%B8%E0%AD%8D%E0%AC%95%E0%AD%8D%E0%AC%B0%E0%AC%BF%E0%AC%AA%E0%AD%8D%E0%AC%9F" title="ଜାଭାସ୍କ୍ରିପ୍ଟ – oriya" lang="or" hreflang="or" data-title="ଜାଭାସ୍କ୍ରିପ୍ଟ" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="oriya" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-uz mw-list-item"><a href="https://uz.wikipedia.org/wiki/JavaScript" title="JavaScript – uzbekiska" lang="uz" hreflang="uz" data-title="JavaScript" data-language-autonym="Oʻzbekcha / ўзбекча" data-language-local-name="uzbekiska" class="interlanguage-link-target"><span>Oʻzbekcha / ўзбекча</span></a></li><li class="interlanguage-link interwiki-pnb mw-list-item"><a href="https://pnb.wikipedia.org/wiki/%D8%AC%D8%A7%D9%88%D8%A7_%D8%B3%DA%A9%D8%B1%D9%BE%D9%B9" title="جاوا سکرپٹ – Western Punjabi" lang="pnb" hreflang="pnb" data-title="جاوا سکرپٹ" data-language-autonym="پنجابی" data-language-local-name="Western Punjabi" class="interlanguage-link-target"><span>پنجابی</span></a></li><li class="interlanguage-link interwiki-blk mw-list-item"><a href="https://blk.wikipedia.org/wiki/JavaScript" title="JavaScript – Pa'O" lang="blk" hreflang="blk" data-title="JavaScript" data-language-autonym="ပအိုဝ်ႏဘာႏသာႏ" data-language-local-name="Pa'O" class="interlanguage-link-target"><span>ပအိုဝ်ႏဘာႏသာႏ</span></a></li><li class="interlanguage-link interwiki-km mw-list-item"><a href="https://km.wikipedia.org/wiki/JavaScript" title="JavaScript – kambodjanska" lang="km" hreflang="km" data-title="JavaScript" data-language-autonym="ភាសាខ្មែរ" data-language-local-name="kambodjanska" class="interlanguage-link-target"><span>ភាសាខ្មែរ</span></a></li><li class="interlanguage-link interwiki-pwn mw-list-item"><a href="https://pwn.wikipedia.org/wiki/JavaScript" title="JavaScript – Paiwan" lang="pwn" hreflang="pwn" data-title="JavaScript" data-language-autonym="Pinayuanan" data-language-local-name="Paiwan" class="interlanguage-link-target"><span>Pinayuanan</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/JavaScript" title="JavaScript – polska" lang="pl" hreflang="pl" data-title="JavaScript" data-language-autonym="Polski" data-language-local-name="polska" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/JavaScript" title="JavaScript – portugisiska" lang="pt" hreflang="pt" data-title="JavaScript" data-language-autonym="Português" data-language-local-name="portugisiska" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-kaa mw-list-item"><a href="https://kaa.wikipedia.org/wiki/JavaScript" title="JavaScript – karakalpakiska" lang="kaa" hreflang="kaa" data-title="JavaScript" data-language-autonym="Qaraqalpaqsha" data-language-local-name="karakalpakiska" class="interlanguage-link-target"><span>Qaraqalpaqsha</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/JavaScript" title="JavaScript – rumänska" lang="ro" hreflang="ro" data-title="JavaScript" data-language-autonym="Română" data-language-local-name="rumänska" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-qu mw-list-item"><a href="https://qu.wikipedia.org/wiki/JavaScript" title="JavaScript – quechua" lang="qu" hreflang="qu" data-title="JavaScript" data-language-autonym="Runa Simi" data-language-local-name="quechua" class="interlanguage-link-target"><span>Runa Simi</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/JavaScript" title="JavaScript – ryska" lang="ru" hreflang="ru" data-title="JavaScript" data-language-autonym="Русский" data-language-local-name="ryska" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sah mw-list-item"><a href="https://sah.wikipedia.org/wiki/JavaScript" title="JavaScript – jakutiska" lang="sah" hreflang="sah" data-title="JavaScript" data-language-autonym="Саха тыла" data-language-local-name="jakutiska" class="interlanguage-link-target"><span>Саха тыла</span></a></li><li class="interlanguage-link interwiki-sco mw-list-item"><a href="https://sco.wikipedia.org/wiki/JavaScript" title="JavaScript – skotska" lang="sco" hreflang="sco" data-title="JavaScript" data-language-autonym="Scots" data-language-local-name="skotska" class="interlanguage-link-target"><span>Scots</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/JavaScript" title="JavaScript – albanska" lang="sq" hreflang="sq" data-title="JavaScript" data-language-autonym="Shqip" data-language-local-name="albanska" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-si mw-list-item"><a href="https://si.wikipedia.org/wiki/%E0%B6%A2%E0%B7%8F%E0%B7%80%E0%B7%8F_%E0%B6%8B%E0%B6%B4%E0%B6%AF%E0%B7%9A%E0%B7%81%E0%B7%8F%E0%B7%80%E0%B6%BD%E0%B7%92%E0%B6%BA" title="ජාවා උපදේශාවලිය – singalesiska" lang="si" hreflang="si" data-title="ජාවා උපදේශාවලිය" data-language-autonym="සිංහල" data-language-local-name="singalesiska" class="interlanguage-link-target"><span>සිංහල</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/JavaScript" title="JavaScript – Simple English" lang="en-simple" hreflang="en-simple" data-title="JavaScript" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/JavaScript" title="JavaScript – slovakiska" lang="sk" hreflang="sk" data-title="JavaScript" data-language-autonym="Slovenčina" data-language-local-name="slovakiska" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/JavaScript" title="JavaScript – slovenska" lang="sl" hreflang="sl" data-title="JavaScript" data-language-autonym="Slovenščina" data-language-local-name="slovenska" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-so mw-list-item"><a href="https://so.wikipedia.org/wiki/JavaScript" title="JavaScript – somaliska" lang="so" hreflang="so" data-title="JavaScript" data-language-autonym="Soomaaliga" data-language-local-name="somaliska" class="interlanguage-link-target"><span>Soomaaliga</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D8%AC%D8%A7%DA%A4%D8%A7%D8%B3%DA%A9%D8%B1%DB%8C%D9%BE%D8%AA" title="جاڤاسکریپت – centralkurdiska" lang="ckb" hreflang="ckb" data-title="جاڤاسکریپت" data-language-autonym="کوردی" data-language-local-name="centralkurdiska" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/JavaScript" title="JavaScript – serbiska" lang="sr" hreflang="sr" data-title="JavaScript" data-language-autonym="Српски / srpski" data-language-local-name="serbiska" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/JavaScript" title="JavaScript – serbokroatiska" lang="sh" hreflang="sh" data-title="JavaScript" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="serbokroatiska" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-su mw-list-item"><a href="https://su.wikipedia.org/wiki/JavaScript" title="JavaScript – sundanesiska" lang="su" hreflang="su" data-title="JavaScript" data-language-autonym="Sunda" data-language-local-name="sundanesiska" class="interlanguage-link-target"><span>Sunda</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/JavaScript" title="JavaScript – finska" lang="fi" hreflang="fi" data-title="JavaScript" data-language-autonym="Suomi" data-language-local-name="finska" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-tl mw-list-item"><a href="https://tl.wikipedia.org/wiki/JavaScript" title="JavaScript – tagalog" lang="tl" hreflang="tl" data-title="JavaScript" data-language-autonym="Tagalog" data-language-local-name="tagalog" class="interlanguage-link-target"><span>Tagalog</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%AF%E0%AE%BE%E0%AE%B5%E0%AE%BE%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%BF%E0%AE%B1%E0%AE%BF%E0%AE%9F%E0%AF%8D%E0%AE%9F%E0%AF%81" title="யாவாக்கிறிட்டு – tamil" lang="ta" hreflang="ta" data-title="யாவாக்கிறிட்டு" data-language-autonym="தமிழ்" data-language-local-name="tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-kab mw-list-item"><a href="https://kab.wikipedia.org/wiki/JavaScript" title="JavaScript – kabyliska" lang="kab" hreflang="kab" data-title="JavaScript" data-language-autonym="Taqbaylit" data-language-local-name="kabyliska" class="interlanguage-link-target"><span>Taqbaylit</span></a></li><li class="interlanguage-link interwiki-tt mw-list-item"><a href="https://tt.wikipedia.org/wiki/JavaScript" title="JavaScript – tatariska" lang="tt" hreflang="tt" data-title="JavaScript" data-language-autonym="Татарча / tatarça" data-language-local-name="tatariska" class="interlanguage-link-target"><span>Татарча / tatarça</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikipedia.org/wiki/%E0%B0%9C%E0%B0%BE%E0%B0%B5%E0%B0%BE%E0%B0%B8%E0%B1%8D%E0%B0%95%E0%B1%8D%E0%B0%B0%E0%B0%BF%E0%B0%AA%E0%B1%8D%E0%B0%9F%E0%B1%81" title="జావాస్క్రిప్టు – telugu" lang="te" hreflang="te" data-title="జావాస్క్రిప్టు" data-language-autonym="తెలుగు" data-language-local-name="telugu" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-tet mw-list-item"><a href="https://tet.wikipedia.org/wiki/JavaScript" title="JavaScript – tetum" lang="tet" hreflang="tet" data-title="JavaScript" data-language-autonym="Tetun" data-language-local-name="tetum" class="interlanguage-link-target"><span>Tetun</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%88%E0%B8%B2%E0%B8%A7%E0%B8%B2%E0%B8%AA%E0%B8%84%E0%B8%A3%E0%B8%B4%E0%B8%9B%E0%B8%95%E0%B9%8C" title="จาวาสคริปต์ – thailändska" lang="th" hreflang="th" data-title="จาวาสคริปต์" data-language-autonym="ไทย" data-language-local-name="thailändska" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/JavaScript" title="JavaScript – turkiska" lang="tr" hreflang="tr" data-title="JavaScript" data-language-autonym="Türkçe" data-language-local-name="turkiska" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-tk mw-list-item"><a href="https://tk.wikipedia.org/wiki/JavaScript" title="JavaScript – turkmeniska" lang="tk" hreflang="tk" data-title="JavaScript" data-language-autonym="Türkmençe" data-language-local-name="turkmeniska" class="interlanguage-link-target"><span>Türkmençe</span></a></li><li class="interlanguage-link interwiki-bug mw-list-item"><a href="https://bug.wikipedia.org/wiki/JavaScript" title="JavaScript – buginesiska" lang="bug" hreflang="bug" data-title="JavaScript" data-language-autonym="Basa Ugi" data-language-local-name="buginesiska" class="interlanguage-link-target"><span>Basa Ugi</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/JavaScript" title="JavaScript – ukrainska" lang="uk" hreflang="uk" data-title="JavaScript" data-language-autonym="Українська" data-language-local-name="ukrainska" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%AC%D8%A7%D9%88%D8%A7_%D8%A7%D8%B3%DA%A9%D8%B1%D9%BE%D9%B9" title="جاوا اسکرپٹ – urdu" lang="ur" hreflang="ur" data-title="جاوا اسکرپٹ" data-language-autonym="اردو" data-language-local-name="urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-vec mw-list-item"><a href="https://vec.wikipedia.org/wiki/JavaScript" title="JavaScript – venetianska" lang="vec" hreflang="vec" data-title="JavaScript" data-language-autonym="Vèneto" data-language-local-name="venetianska" class="interlanguage-link-target"><span>Vèneto</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/JavaScript" title="JavaScript – vietnamesiska" lang="vi" hreflang="vi" data-title="JavaScript" data-language-autonym="Tiếng Việt" data-language-local-name="vietnamesiska" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-classical mw-list-item"><a href="https://zh-classical.wikipedia.org/wiki/%E7%88%AA%E5%93%87%E6%89%8B%E7%A8%BF%E8%AA%9E" title="爪哇手稿語 – litterär kineiska" lang="lzh" hreflang="lzh" data-title="爪哇手稿語" data-language-autonym="文言" data-language-local-name="litterär kineiska" class="interlanguage-link-target"><span>文言</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/JavaScript" title="JavaScript – wu" lang="wuu" hreflang="wuu" data-title="JavaScript" data-language-autonym="吴语" data-language-local-name="wu" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/JavaScript" title="JavaScript – kantonesiska" lang="yue" hreflang="yue" data-title="JavaScript" data-language-autonym="粵語" data-language-local-name="kantonesiska" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-bat-smg mw-list-item"><a href="https://bat-smg.wikipedia.org/wiki/JavaScript" title="JavaScript – samogitiska" lang="sgs" hreflang="sgs" data-title="JavaScript" data-language-autonym="Žemaitėška" data-language-local-name="samogitiska" class="interlanguage-link-target"><span>Žemaitėška</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/JavaScript" title="JavaScript – kinesiska" lang="zh" hreflang="zh" data-title="JavaScript" data-language-autonym="中文" data-language-local-name="kinesiska" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q2005#sitelinks-wikipedia" title="Redigera interwikilänkar" class="wbc-editpage">Redigera länkar</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namnrymder"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Javascript" title="Visa innehållssidan [c]" accesskey="c"><span>Artikel</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Diskussion:Javascript" rel="discussion" title="Diskussion om innehållssidan [t]" accesskey="t"><span>Diskussion</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Ändra språkvariant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">svenska</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Visningar"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Javascript"><span>Läs</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Javascript&veaction=edit" title="Redigera denna sida [v]" accesskey="v"><span>Redigera</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Javascript&action=edit" title="Redigera wikitexten för den här sidan [e]" accesskey="e"><span>Redigera wikitext</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Javascript&action=history" title="Tidigare versioner av sidan [h]" accesskey="h"><span>Visa historik</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Sidverktyg"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Verktyg" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Verktyg</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Verktyg</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">flytta till sidofältet</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">dölj</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Fler alternativ" > <div class="vector-menu-heading"> Åtgärder </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Javascript"><span>Läs</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Javascript&veaction=edit" title="Redigera denna sida [v]" accesskey="v"><span>Redigera</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Javascript&action=edit" title="Redigera wikitexten för den här sidan [e]" accesskey="e"><span>Redigera wikitext</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Javascript&action=history"><span>Visa historik</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Allmänt </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:L%C3%A4nkar_hit/Javascript" title="Lista över alla wikisidor som länkar hit [j]" accesskey="j"><span>Sidor som länkar hit</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:Senaste_relaterade_%C3%A4ndringar/Javascript" rel="nofollow" title="Visa senaste ändringarna av sidor som den här sidan länkar till [k]" accesskey="k"><span>Relaterade ändringar</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:Specialsidor" title="Lista över alla specialsidor [q]" accesskey="q"><span>Specialsidor</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Javascript&oldid=56268866" title="Permanent länk till den här versionen av sidan"><span>Permanent länk</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Javascript&action=info" title="Mer information om denna sida"><span>Sidinformation</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:Citera&page=Javascript&id=56268866&wpFormIdentifier=titleform" title="Information om hur den här artikeln kan användas som referens"><span>Använd som referens</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fsv.wikipedia.org%2Fwiki%2FJavascript"><span>Hämta förkortad url</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fsv.wikipedia.org%2Fwiki%2FJavascript"><span>Ladda ner QR-kod</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Skriv ut/exportera </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Bok&bookcmd=book_creator&referer=Javascript"><span>Skapa en bok</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Javascript&action=show-download-screen"><span>Ladda ned som PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Javascript&printable=yes" title="Utskriftsvänlig version av den här sidan [p]" accesskey="p"><span>Utskriftsvänlig version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> På andra projekt </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:JavaScript" hreflang="en"><span>Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-mediawiki mw-list-item"><a href="https://www.mediawiki.org/wiki/JavaScript" hreflang="en"><span>MediaWiki</span></a></li><li class="wb-otherproject-link wb-otherproject-wikifunctions mw-list-item"><a href="https://www.wikifunctions.org/wiki/Z600" hreflang="en"><span>Wikifunctions</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q2005" title="Länk till anslutet databasobjekt [g]" accesskey="g"><span>Wikidata-objekt</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Sidverktyg"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Utseende"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Utseende</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">flytta till sidofältet</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">dölj</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">Från Wikipedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="sv" dir="ltr"><div class="noexcerpt noprint hanvisning_bas"> <dl><dd><i>Ej att förväxla med <a href="/wiki/Java_(programspr%C3%A5k)" title="Java (programspråk)">Java (programspråk)</a>.</i></dd></dl></div><style data-mw-deduplicate="TemplateStyles:r51224235">.mw-parser-output table.ambox{margin:0 10%;border-collapse:collapse;background:#fbfbfb;border:1px solid #aaa;border-left:10px solid #608ec2}.mw-parser-output table.ambox th.ambox-text,.mw-parser-output table.ambox td.ambox-text{padding:.25em .5em;width:100%}.mw-parser-output table.ambox td.ambox-image{padding:2px 0 2px .5em;text-align:center;vertical-align:middle}.mw-parser-output table.ambox td.ambox-imageright{padding:2px 4px 2px 0;text-align:center;vertical-align:middle}.mw-parser-output table.ambox-notice{border-left:10px solid #608ec2}.mw-parser-output table.ambox-delete,.mw-parser-output table.ambox-serious{border-left:10px solid #b22222}.mw-parser-output table.ambox-content{border-left:10px solid #f28500}.mw-parser-output table.ambox-style{border-left:10px solid #f4c430}.mw-parser-output table.ambox-merge{border-left:10px solid #9932cc}.mw-parser-output table.ambox-protection{border-left:10px solid #bba}.mw-parser-output .ambox+link+.ambox{border-top-width:0}.mw-parser-output .messagebox{border:1px solid #aaaaaa;background-color:#f8f9fa;width:80%;margin:0 auto 1em auto;padding:.2em}.mw-parser-output .messagebox.merge{border:1px solid #c0b8cc;background-color:#f0e5ff;text-align:center}.mw-parser-output .messagebox.cleanup{border:1px solid #9f9fff;background-color:#efefff;text-align:center}.mw-parser-output .messagebox.standard-talk{border:1px solid #c0c090;background-color:#f8eaba}.mw-parser-output .messagebox.nested-talk{border:1px solid #c0c090;background-color:#f8eaba;width:100%;margin:2px 4px}</style><table class="metadata ambox ambox-content" style=""> <tbody><tr> <td class="ambox-image"> <div style="width:52px;"><span typeof="mw:File"><a href="/wiki/Fil:Question_book-4.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/6/64/Question_book-4.svg/40px-Question_book-4.svg.png" decoding="async" width="40" height="31" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/64/Question_book-4.svg/60px-Question_book-4.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/64/Question_book-4.svg/80px-Question_book-4.svg.png 2x" data-file-width="262" data-file-height="204" /></a></span></div></td> <td class="ambox-text">Den här artikeln <b>behöver fler eller bättre <a href="/wiki/Wikipedia:K%C3%A4llh%C3%A4nvisningar" title="Wikipedia:Källhänvisningar">källhänvisningar</a> för att kunna <a href="/wiki/Wikipedia:Verifierbarhet" title="Wikipedia:Verifierbarhet">verifieras</a>.</b> <small>(2018-04)</small> <br /><small>Åtgärda genom att lägga till pålitliga källor (<a href="/wiki/Wikipedia:Introduktion_till_k%C3%A4llh%C3%A4nvisningar" title="Wikipedia:Introduktion till källhänvisningar">gärna som fotnoter</a>). Uppgifter utan källhänvisning kan <a href="/wiki/Mall:K%C3%A4lla_beh%C3%B6vs" title="Mall:Källa behövs">ifrågasättas</a> och tas bort utan att det behöver diskuteras på <a href="/wiki/Diskussion:Javascript" title="Diskussion:Javascript">diskussionssidan</a>.</small></td> </tr> </tbody></table> <style data-mw-deduplicate="TemplateStyles:r53696904">.mw-parser-output .infobox{border:1px solid #aaa;background-color:#f9f9f9;color:black;margin:.5em 0 .5em 1em;padding:.2em;float:right;clear:right;width:22em;text-align:left;font-size:88%;line-height:1.6em}.mw-parser-output .infobox td,.mw-parser-output .infobox th{vertical-align:top;padding:0 .2em}.mw-parser-output .infobox caption{font-size:larger}.mw-parser-output .infobox.bordered{border-collapse:collapse}.mw-parser-output .infobox.bordered td,.mw-parser-output .infobox.bordered th{border:1px solid #aaa}.mw-parser-output .infobox.bordered .borderless td,.mw-parser-output .infobox.bordered .borderless th{border:0}.mw-parser-output .infobox-showbutton button,.mw-parser-output .infobox-showbutton .mw-collapsible-text{color:inherit}.mw-parser-output .infobox.bordered .mergedtoprow td,.mw-parser-output .infobox.bordered .mergedtoprow th{border:0;border-top:1px solid #aaa;border-right:1px solid #aaa}.mw-parser-output .infobox.bordered .mergedrow td,.mw-parser-output .infobox.bordered .mergedrow th{border:0;border-right:1px solid #aaa}.mw-parser-output .infobox.geography{border:1px solid #ccd2d9;text-align:left;border-collapse:collapse;line-height:1.2em;font-size:90%}.mw-parser-output .infobox.geography td,.mw-parser-output .infobox.geography th{border-top:solid 1px #ccd2d9;padding:0.4em 0.6em 0.4em 0.6em}.mw-parser-output .infobox.geography .mergedtoprow td,.mw-parser-output .infobox.geography .mergedtoprow th{border-top:solid 1px #ccd2d9;padding:0.4em 0.6em 0.2em 0.6em}.mw-parser-output .infobox.geography .mergedrow td,.mw-parser-output .infobox.geography .mergedrow th{border:0;padding:0 0.6em 0.2em 0.6em}.mw-parser-output .infobox.geography .mergedbottomrow td,.mw-parser-output .infobox.geography .mergedbottomrow th{border-top:0;border-bottom:solid 1px #ccd2d9;padding:0 0.6em 0.4em 0.6em}.mw-parser-output .infobox.geography .maptable td,.mw-parser-output .infobox.geography .maptable th{border:0;padding:0}</style><table class="infobox" style="border-spacing:3px;"><tbody><tr><td colspan="2" class="" style="padding:2px; text-align:center; font-size: 125%; font-weight: bold;">Javascript</td></tr><tr><th style="text-align:left;"><a href="/wiki/Programmeringsparadigm" title="Programmeringsparadigm">Paradigm</a></th><td class="" style=""><a href="/wiki/Programmeringsparadigm" title="Programmeringsparadigm">multi-paradigm</a></td></tr><tr><th style="text-align:left;">Gavs ut</th><td class="" style="">1995</td></tr><tr><th style="text-align:left;">Skapat av</th><td class="" style=""><a href="/wiki/Brendan_Eich" title="Brendan Eich">Brendan Eich</a></td></tr><tr><th style="text-align:left;"><a href="/wiki/Programutvecklare" class="mw-redirect" title="Programutvecklare">Utvecklare</a></th><td class="" style="">många</td></tr><tr><th style="text-align:left;">Senaste version</th><td class="" style="">ECMAScript 2021 (2021)</td></tr><tr><th style="text-align:left;"><a href="/wiki/Typsystem" title="Typsystem">Datatypsdisciplin</a></th><td class="" style="">weak, duck, dynamic</td></tr><tr><th style="text-align:left;"><a href="/wiki/Implementation_(programmering)" title="Implementation (programmering)">Implementationer</a></th><td class="" style="">SpiderMonkey, Rhino, WebKit, V8, KJS, Carakan, Chakra</td></tr><tr><th style="text-align:left;">Influerat av</th><td class="" style=""><a href="/wiki/Awk" title="Awk">AWK</a>, <a href="/wiki/C_(programspr%C3%A5k)" title="C (programspråk)">C</a>, <a href="/wiki/HTML" title="HTML">HTML</a>, <a href="/wiki/Java_(programspr%C3%A5k)" title="Java (programspråk)">Java</a>, <a href="/wiki/Perl" title="Perl">Perl</a>, <a href="/wiki/Python_(programspr%C3%A5k)" title="Python (programspråk)">Python</a>, <a href="/wiki/Scheme" title="Scheme">Scheme</a>, <a href="/w/index.php?title=Self_(programspr%C3%A5k)&action=edit&redlink=1" class="new" title="Self (programspråk) [inte skriven än]">Self</a></td></tr><tr><th style="text-align:left;">Influerat</th><td class="" style=""><a href="/wiki/Actionscript" title="Actionscript">Actionscript</a>, <a href="/w/index.php?title=Coffeescript&action=edit&redlink=1" class="new" title="Coffeescript [inte skriven än]">Coffeescript</a>, <a href="/wiki/TypeScript" title="TypeScript">TypeScript</a>, Dart, <a href="/w/index.php?title=JScript_.NET&action=edit&redlink=1" class="new" title="JScript .NET [inte skriven än]">JScript .NET</a>, <a href="/w/index.php?title=Objective-J&action=edit&redlink=1" class="new" title="Objective-J [inte skriven än]">Objective-J</a>, <a href="/w/index.php?title=QML&action=edit&redlink=1" class="new" title="QML [inte skriven än]">QML</a>, <a href="/w/index.php?title=TIScript&action=edit&redlink=1" class="new" title="TIScript [inte skriven än]">TIScript</a></td></tr></tbody></table> <p><b>Javascript</b>, i marknadsföringssyfte skrivet <i>JavaScript</i> och förkortat <i>JS</i>, är ett prototyp-baserat <a href="/wiki/Skriptspr%C3%A5k" title="Skriptspråk">skriptspråk</a> som är dynamiskt, <a href="/wiki/Typsystem" title="Typsystem">svagt typat</a> och hanterar funktioner som första-klass-objekt. Javascript används främst på klientsidan i <a href="/wiki/World_Wide_Web" class="mw-redirect" title="World Wide Web">webbtillämpningar</a>, det vill säga exekveras i en <a href="/wiki/Webbl%C3%A4sare" title="Webbläsare">webbläsares</a> Javascriptmotor.<sup id="cite_ref-:1_1-0" class="reference"><a href="#cite_note-:1-1"><span class="cite-reference-link-bracket">[</span>1<span class="cite-reference-link-bracket">]</span></a></sup> När Javascript används i webbläsare arbetar det mot ett <a href="/wiki/Gr%C3%A4nssnitt" title="Gränssnitt">gränssnitt</a> som kallas <a href="/wiki/Document_Object_Model" title="Document Object Model">Document Object Model</a> (DOM), som tillgängliggör HTML-dokumentet som objekt.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-reference-link-bracket">[</span>2<span class="cite-reference-link-bracket">]</span></a></sup> Exempel på användningsområden för JavaScript på <a href="/wiki/Webben" title="Webben">webben</a> är kontroll av ifyllda fält innan formulär skickas till en <a href="/wiki/Server" title="Server">server</a>, funktioner för att visa eller dölja delar av en sida och växling av annonsbilder med visst intervall. Javascript kan även användas för mer avancerade funktioner i en webbläsare såsom spel och bildbehandling. </p><p>Skriptspråket kan implementeras i andra program än webbläsare. Ett numera vanligt exempel av implementation utanför webbläsaren är <a href="/wiki/Node.js" title="Node.js">Node.js</a>, som tillåter utvecklaren att använda Javascript på serversidan för att kunna arbeta med anslutningar till <a href="/wiki/Databas" title="Databas">databaser</a>, skicka <a href="/wiki/E-post" title="E-post">e-post</a>-meddelanden och så vidare.<sup id="cite_ref-:1_1-1" class="reference"><a href="#cite_note-:1-1"><span class="cite-reference-link-bracket">[</span>1<span class="cite-reference-link-bracket">]</span></a></sup> Andra implementationer, däribland Bun och Deno har under 2020-talet utvecklats för att få en nystart för JavaScript på servern. Dessa alternativa motorerna har ofta högre prestanda då de inte behöver stöda legacy-applikationer<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-reference-link-bracket">[</span>3<span class="cite-reference-link-bracket">]</span></a></sup> </p><p>En <a href="/wiki/Javascriptmotor" title="Javascriptmotor">Javascriptmotor</a> är en specialiserad <a href="/wiki/Programvara" title="Programvara">programvara</a> som <a href="/wiki/Exekvera" class="mw-redirect" title="Exekvera">exekverar</a> Javascript, särskilt för webbläsare. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Historia_och_namngivning">Historia och namngivning</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=1" title="Redigera avsnitt: Historia och namngivning" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=1" title="Redigera avsnitts källkod: Historia och namngivning"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Javascript utvecklades ursprungligen av <a href="/wiki/Brendan_Eich" title="Brendan Eich">Brendan Eich</a>,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-reference-link-bracket">[</span>4<span class="cite-reference-link-bracket">]</span></a></sup> då under namnet <i>Mocha</i> som senare ändrades först till <i>Livescript</i> men i och med att Netscape ungefär samtidigt började stödja <a href="/wiki/Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a> programspråk <a href="/wiki/Java_(programspr%C3%A5k)" title="Java (programspråk)">Java</a> i syfte att kunna ha miniprogram i webbläsaren, valde man att kalla det Javascript, främst i <a href="/wiki/Marknadsf%C3%B6ring" title="Marknadsföring">marknadsföringssyfte</a>. Förutom namnet har Javascript inget med programspråket Java att göra förutom att de delar programspråket <a href="/wiki/C_(programspr%C3%A5k)" title="C (programspråk)">C</a>:s syntax. Det faktum att namnen liknar varandra har lett till en del förvirring.<sup id="cite_ref-:0_5-0" class="reference"><a href="#cite_note-:0-5"><span class="cite-reference-link-bracket">[</span>5<span class="cite-reference-link-bracket">]</span></a></sup> </p><p>Javascript dök för första gången upp i <a href="/wiki/Netscape_Navigator" class="mw-redirect" title="Netscape Navigator">Netscape Navigator</a> 2.0B3, släppt i december <a href="/wiki/1995" title="1995">1995</a>. <a href="/wiki/Microsoft" title="Microsoft">Microsoft</a> skapade en egen variant av Javascript, som namngavs <a href="/wiki/JScript" title="JScript">JScript</a> för att undvika <a href="/wiki/Varum%C3%A4rke" title="Varumärke">varumärkesintrång</a>. Denna kom i version 3.0 av <a href="/wiki/Internet_Explorer" title="Internet Explorer">Internet Explorer</a>. JScript och Javascript skilde sig markant på inbyggda objekt och funktioner vilket ledde fram till behovet av en gemensam standard för skriptspråket, standarden kom att kallas för ECMA-262, även känt som <a href="/wiki/Ecmascript" class="mw-redirect" title="Ecmascript">Ecmascript</a>.<sup id="cite_ref-:0_5-1" class="reference"><a href="#cite_note-:0-5"><span class="cite-reference-link-bracket">[</span>5<span class="cite-reference-link-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Kodexempel">Kodexempel</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=2" title="Redigera avsnitt: Kodexempel" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=2" title="Redigera avsnitts källkod: Kodexempel"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Javascript-koden i detta exempel är inbäddad i HTML-koden med hjälp av en script-tagg och skriver ut texten "<a href="/wiki/Hello,_World!" class="mw-redirect" title="Hello, World!">Hello, World!</a>": </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="o"><</span><span class="nx">script</span><span class="o">></span> <span class="w"> </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s1">'Hello, World!'</span><span class="p">);</span> <span class="o"><</span><span class="err">/script></span> </pre></div> <hr /> <p>Man kan även skapa en funktion på följande vis. </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="o"><</span><span class="nx">script</span><span class="o">></span> <span class="w"> </span><span class="kd">function</span><span class="w"> </span><span class="nx">minFunktion</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s1">'Hello, World!'</span><span class="p">);</span> <span class="w"> </span><span class="p">}</span> <span class="o"><</span><span class="err">/script></span> </pre></div> <p>Funktionen kan sedan anropas via ett HTML-element, exempelvis genom att klicka på en <a href="/wiki/Hyperl%C3%A4nk" title="Hyperlänk">hyperlänk</a>. </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="p"><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"#"</span> <span class="na">id</span><span class="o">=</span><span class="s">"link"</span><span class="p">></span>Klicka här för att köra funktionen<span class="p"></</span><span class="nt">a</span><span class="p">></span> <span class="p"><</span><span class="nt">script</span><span class="p">></span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="s1">'#link'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s1">'click'</span><span class="p">,</span><span class="w"> </span><span class="nx">minFunktion</span><span class="p">);</span> <span class="p"></</span><span class="nt">script</span><span class="p">></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Async/Await_och_löften"><span id="Async.2FAwait_och_l.C3.B6ften"></span>Async/Await och löften</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=3" title="Redigera avsnitt: Async/Await och löften" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=3" title="Redigera avsnitts källkod: Async/Await och löften"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Javascript stöder async/await och löften för att utföra asynkrona operationer. Kombinationsmetoder för flera löften infördes nyligen i Javascript-specifikationen. De möjliggör kombinationen av flera löften, och utföringen av olika operationer beroende på situationen. De införda metoderna är: Promise.race, Promise.all, Promise.allSettled och Promise.any. Exempel på <a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all">Promise.all</a>: </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">let</span><span class="w"> </span><span class="nx">löfte1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">fetch</span><span class="p">(</span><span class="nx">länk</span><span class="p">);</span> <span class="kd">let</span><span class="w"> </span><span class="nx">löfte2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">35</span><span class="p">;</span> <span class="nb">Promise</span><span class="p">.</span><span class="nx">all</span><span class="p">([</span> <span class="w"> </span><span class="nx">löfte1</span><span class="p">,</span> <span class="w"> </span><span class="nx">löfte2</span> <span class="p">])</span> <span class="p">.</span><span class="nx">then</span><span class="p">((</span><span class="nx">data</span><span class="p">)</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span> <span class="p">})</span> <span class="p">.</span><span class="k">catch</span><span class="p">((</span><span class="nx">err</span><span class="p">)</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> <span class="p">});</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Syntax">Syntax</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=4" title="Redigera avsnitt: Syntax" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=4" title="Redigera avsnitts källkod: Syntax"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Javascript stöder det mesta av syntaxen i C (till exempel if-satser, while-slingor, switch-satser, osv.). Som i de flesta skriptspråk är variabeltyper inte knutna till variabeln själv, utan snarare till dess värde. Till exempel så kan variabeln x vara en sträng som innehåller siffror. Det betraktas då inte som ett tal, utan just som en sträng.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-reference-link-bracket">[</span>6<span class="cite-reference-link-bracket">]</span></a></sup> Den strängen kan sedan konverteras till ett tal dynamiskt, t.ex: </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// En funktion så att vi slipper upprepning av kod</span> <span class="kd">function</span><span class="w"> </span><span class="nx">tala_om_variabel_typ</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s1">'Variabeln x är av typen "'</span><span class="o">+</span><span class="ow">typeof</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span><span class="o">+</span><span class="s1">'" och innehåller värdet ('</span><span class="o">+</span><span class="nx">x</span><span class="o">+</span><span class="s1">').'</span><span class="p">);</span> <span class="p">}</span> <span class="kd">var</span><span class="w"> </span><span class="nx">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"123"</span><span class="p">;</span><span class="w"> </span><span class="c1">// Tilldela x en sträng med tecken "1", "2" och "3".</span> <span class="nx">tala_om_variabel_typ</span><span class="p">(</span><span class="nx">x</span><span class="p">);</span> <span class="c1">// Detta trick konverterar en sträng med siffror till ett tal.</span> <span class="nx">x</span><span class="o">-=</span><span class="mf">0</span><span class="p">;</span><span class="w"> </span><span class="c1">// x=+x fungerar lika bra.</span> <span class="nx">tala_om_variabel_typ</span><span class="p">(</span><span class="nx">x</span><span class="p">);</span> </pre></div><p> Vilket ger resultatet:</p><pre>Variabeln x är av typen "string" och innehåller värdet (123). Variabeln x är av typen "number" och innehåller värdet (123).</pre> <p>Javascript stöder olika sätt att testa vilken typ av variabel det handlar om. Man kan även skriva funktioner i Javascript-koden som man kan kalla på senare i HTML-koden. Till exempel: </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="o"><</span><span class="nx">script</span><span class="o">></span> <span class="kd">function</span><span class="w"> </span><span class="nx">bytBild</span><span class="p">()</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nb">document</span><span class="p">.</span><span class="nx">images</span><span class="p">[</span><span class="s2">"bild"</span><span class="p">].</span><span class="nx">src</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"bild2.jpg"</span><span class="p">;</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="kc">true</span><span class="p">;</span> <span class="p">}</span> <span class="o"><</span><span class="err">/script></span> </pre></div> <p>Koden ovanför innebär att om funktionen "bytBild" kallas i HTML-koden så kommer bilden med namnet "bild" att ändras till bilden "bild2.jpg". Detta kan vara användbart om man vill göra en knapp som ska se annorlunda ut när man håller musen över den. </p> <div class="mw-heading mw-heading2"><h2 id="Skriptbibliotek_och_ramverk">Skriptbibliotek och ramverk</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=5" title="Redigera avsnitt: Skriptbibliotek och ramverk" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=5" title="Redigera avsnitts källkod: Skriptbibliotek och ramverk"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>För att förenkla användandet av Javascript, DOM och för att undvika återuppfinnandet av hjulet (d.v.s. att man i onödan skriver sådan kod som andra redan har skapat) har erfarna programmerare skrivit Javascript-bibliotek som innehåller funktioner och objekt som man kan återanvända. </p><p><br /> </p> <div class="mw-heading mw-heading3"><h3 id="Lista_på_några_Javascript-bibliotek_och_ramverk"><span id="Lista_p.C3.A5_n.C3.A5gra_Javascript-bibliotek_och_ramverk"></span>Lista på några Javascript-bibliotek och ramverk</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=6" title="Redigera avsnitt: Lista på några Javascript-bibliotek och ramverk" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=6" title="Redigera avsnitts källkod: Lista på några Javascript-bibliotek och ramverk"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Prototypejs" class="mw-redirect" title="Prototypejs">Prototypejs</a></li> <li><a href="/wiki/Script.aculo.us" title="Script.aculo.us">script.aculo.us</a></li> <li><a href="/w/index.php?title=Dojo_Toolkit&action=edit&redlink=1" class="new" title="Dojo Toolkit [inte skriven än]">Dojo Toolkit</a></li> <li><a href="/w/index.php?title=Mochikit&action=edit&redlink=1" class="new" title="Mochikit [inte skriven än]">Mochikit</a></li> <li><a href="/wiki/JQuery" class="mw-redirect" title="JQuery">Jquery</a></li> <li><a href="/w/index.php?title=Mootools&action=edit&redlink=1" class="new" title="Mootools [inte skriven än]">Mootools</a></li> <li><a href="/w/index.php?title=React&action=edit&redlink=1" class="new" title="React [inte skriven än]">React</a></li></ul> <p>React är ett fritt "front-end" Javascript-bibliotek, som används bl.a. för att bygga enkelsidiga applikationer eller mobilapplikationer med hjälp av React Native. React använder sig ofta av diverse andra bibliotek för att möjliggöra mera funktionalitet. </p> <ul><li><a href="/w/index.php?title=Angular&action=edit&redlink=1" class="new" title="Angular [inte skriven än]">Angular</a></li></ul> <p>Angular är ett TypeScript-baserat webb-ramverk för att också bygga enkelsidiga applikationer. </p> <div class="mw-heading mw-heading2"><h2 id="Liknande_programspråk"><span id="Liknande_programspr.C3.A5k"></span>Liknande programspråk</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=7" title="Redigera avsnitt: Liknande programspråk" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=7" title="Redigera avsnitts källkod: Liknande programspråk"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/C%2B%2B" title="C++">C++</a></li> <li><a href="/wiki/C_(programspr%C3%A5k)" title="C (programspråk)">C (programspråk)</a></li> <li><a href="/wiki/Java_(programmeringsspr%C3%A5k)" class="mw-redirect" title="Java (programmeringsspråk)">Java</a></li> <li><a href="/wiki/Basic" class="mw-redirect" title="Basic">Basic</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Se_även"><span id="Se_.C3.A4ven"></span>Se även</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=8" title="Redigera avsnitt: Se även" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=8" title="Redigera avsnitts källkod: Se även"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Ecmascript" class="mw-redirect" title="Ecmascript">Ecmascript</a></li> <li><a href="/wiki/JScript" title="JScript">JScript</a></li> <li><a href="/wiki/AJAX" title="AJAX">AJAX</a></li> <li><a href="/wiki/JSON" title="JSON">JSON</a></li> <li><a href="/w/index.php?title=Jaxer&action=edit&redlink=1" class="new" title="Jaxer [inte skriven än]">Jaxer</a></li> <li><a href="/wiki/Jquery" title="Jquery">Jquery</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Källor"><span id="K.C3.A4llor"></span>Källor</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=9" title="Redigera avsnitt: Källor" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=9" title="Redigera avsnitts källkod: Källor"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-:1-1">^ [<a href="#cite_ref-:1_1-0"><small>a</small></a> <a href="#cite_ref-:1_1-1"><small>b</small></a>] <span class="reference-text"><cite style="font-style:normal" class="web"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">”JavaScript | MDN”</a> (på amerikansk engelska). <i><span>developer.mozilla.org</span></i><span class="printonly">. <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">https://developer.mozilla.org/en-US/docs/Web/JavaScript</a></span><span class="reference-accessdate">. Läst 19 mars 2022</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.btitle=JavaScript+%7C+MDN&rft.atitle=developer.mozilla.org&rft_id=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> <li id="cite_note-2"><a href="#cite_ref-2">^</a> <span class="reference-text"><cite style="font-style:normal" class="web"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model">”Document Object Model (DOM) - Web APIs | MDN”</a> (på amerikansk engelska). <i><span>developer.mozilla.org</span></i><span class="printonly">. <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model">https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model</a></span><span class="reference-accessdate">. Läst 19 mars 2022</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.btitle=Document+Object+Model+%28DOM%29+-+Web+APIs+%7C+MDN&rft.atitle=developer.mozilla.org&rft_id=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FDocument_Object_Model&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> <li id="cite_note-3"><a href="#cite_ref-3">^</a> <span class="reference-text"><cite style="font-style:normal" class="web"><a rel="nofollow" class="external text" href="https://choubey.gitbook.io/internals-of-deno/introduction/history-of-deno">”1.2 History of Deno”</a><span class="printonly">. <a rel="nofollow" class="external free" href="https://choubey.gitbook.io/internals-of-deno/introduction/history-of-deno">https://choubey.gitbook.io/internals-of-deno/introduction/history-of-deno</a></span><span class="reference-accessdate">. Läst 18 november 2024</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.btitle=1.2+History+of+Deno&rft.atitle=&rft_id=https%3A%2F%2Fchoubey.gitbook.io%2Finternals-of-deno%2Fintroduction%2Fhistory-of-deno&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> <li id="cite_note-4"><a href="#cite_ref-4">^</a> <span class="reference-text"><cite style="font-style:normal" class="web" id="CITEREFKrill">Krill, Paul. <a rel="nofollow" class="external text" href="http://www.infoworld.com/article/2610843/web-browsers/javascript-founder-brendan-eich-takes-over-as-mozilla-ceo.html">”JavaScript founder Brendan Eich takes over as Mozilla CEO”</a><span class="printonly">. <a rel="nofollow" class="external free" href="http://www.infoworld.com/article/2610843/web-browsers/javascript-founder-brendan-eich-takes-over-as-mozilla-ceo.html">http://www.infoworld.com/article/2610843/web-browsers/javascript-founder-brendan-eich-takes-over-as-mozilla-ceo.html</a></span><span class="reference-accessdate">. Läst 8 augusti 2015</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.btitle=JavaScript+founder+Brendan+Eich+takes+over+as+Mozilla+CEO&rft.atitle=&rft.aulast=Krill&rft.aufirst=Paul&rft.au=Krill%2C+Paul&rft_id=http%3A%2F%2Fwww.infoworld.com%2Farticle%2F2610843%2Fweb-browsers%2Fjavascript-founder-brendan-eich-takes-over-as-mozilla-ceo.html&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> <li id="cite_note-:0-5">^ [<a href="#cite_ref-:0_5-0"><small>a</small></a> <a href="#cite_ref-:0_5-1"><small>b</small></a>] <span class="reference-text"><cite style="font-style:normal" class="news"><a rel="nofollow" class="external text" href="https://www.internetmuseum.se/tidslinjen/javascript-spraket-som-gor-webben-roligare/">”JavaScript gör webben roligare”</a>. <i>Internetmuseum</i><span class="printonly">. <a rel="nofollow" class="external free" href="https://www.internetmuseum.se/tidslinjen/javascript-spraket-som-gor-webben-roligare/">https://www.internetmuseum.se/tidslinjen/javascript-spraket-som-gor-webben-roligare/</a></span><span class="reference-accessdate">. Läst 10 april 2018</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=JavaScript+g%C3%B6r+webben+roligare&rft.jtitle=Internetmuseum&rft_id=https%3A%2F%2Fwww.internetmuseum.se%2Ftidslinjen%2Fjavascript-spraket-som-gor-webben-roligare%2F&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> <li id="cite_note-6"><a href="#cite_ref-6">^</a> <span class="reference-text"><cite style="font-style:normal" class="web"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference">”JavaScript reference - JavaScript | MDN”</a> (på amerikansk engelska). <i><span>developer.mozilla.org</span></i><span class="printonly">. <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference</a></span><span class="reference-accessdate">. Läst 19 mars 2022</span>.</cite><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.btitle=JavaScript+reference+-+JavaScript+%7C+MDN&rft.atitle=developer.mozilla.org&rft_id=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference&rfr_id=info:sid/en.wikipedia.org:Javascript"><span style="display: none;"> </span></span></span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Externa_länkar"><span id="Externa_l.C3.A4nkar"></span>Externa länkar</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Javascript&veaction=edit&section=10" title="Redigera avsnitt: Externa länkar" class="mw-editsection-visualeditor"><span>redigera</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Javascript&action=edit&section=10" title="Redigera avsnitts källkod: Externa länkar"><span>redigera wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/15px-Wikibooks-logo.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/23px-Wikibooks-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/30px-Wikibooks-logo.svg.png 2x" data-file-width="300" data-file-height="300" /></span></span> <a href="https://sv.wikibooks.org/wiki/JavaScript" class="extiw" title="b:JavaScript">Javascript</a> på Wikibooks.<div class="interProject wikibooks" style="display:none;"><a href="https://sv.wikibooks.org/wiki/JavaScript" class="extiw" title="b:JavaScript">Böcker</a></div></li></ul> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐869fdccf5d‐pbzxc Cached time: 20241118134235 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.194 seconds Real time usage: 0.231 seconds Preprocessor visited node count: 7011/1000000 Post‐expand include size: 36719/2097152 bytes Template argument size: 12375/2097152 bytes Highest expansion depth: 16/100 Expensive parser function count: 6/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 19646/5000000 bytes Lua time usage: 0.010/10.000 seconds Lua memory usage: 1198464/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 195.852 1 -total 30.21% 59.159 1 Mall:Faktaruta_programspråk 30.00% 58.746 5 Mall:Webbref 29.04% 56.876 1 Mall:Faktamall 26.92% 52.726 6 Mall:Citation/core 26.42% 51.738 5 Mall:Cite_web 14.47% 28.330 1 Mall:Fler_källor 12.48% 24.444 1 Mall:Källor_metamall 11.05% 21.650 1 Mall:Ambox 10.52% 20.602 1 Mall:Förväxlas --> <!-- Saved in parser cache with key svwiki:pcache:idhash:41631-0!canonical and timestamp 20241118134235 and revision id 56268866. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Hämtad från ”<a dir="ltr" href="https://sv.wikipedia.org/w/index.php?title=Javascript&oldid=56268866">https://sv.wikipedia.org/w/index.php?title=Javascript&oldid=56268866</a>”</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Wikipedia:Kategorier" title="Wikipedia:Kategorier">Kategorier</a>: <ul><li><a href="/wiki/Kategori:Javascript" title="Kategori:Javascript">Javascript</a></li><li><a href="/wiki/Kategori:Prototyp-baserade_programspr%C3%A5k" title="Kategori:Prototyp-baserade programspråk">Prototyp-baserade programspråk</a></li><li><a href="/wiki/Kategori:Objekt-baserade_programspr%C3%A5k" title="Kategori:Objekt-baserade programspråk">Objekt-baserade programspråk</a></li><li><a href="/wiki/Kategori:Dom%C3%A4nspecifika_programspr%C3%A5k" title="Kategori:Domänspecifika programspråk">Domänspecifika programspråk</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Dolda kategorier: <ul><li><a href="/wiki/Kategori:Artiklar_som_beh%C3%B6ver_fler_k%C3%A4llor_2018-04" title="Kategori:Artiklar som behöver fler källor 2018-04">Artiklar som behöver fler källor 2018-04</a></li><li><a href="/wiki/Kategori:Alla_artiklar_som_beh%C3%B6ver_fler_k%C3%A4llor" title="Kategori:Alla artiklar som behöver fler källor">Alla artiklar som behöver fler källor</a></li><li><a href="/wiki/Kategori:Alla_artiklar_som_beh%C3%B6ver_k%C3%A4llor" title="Kategori:Alla artiklar som behöver källor">Alla artiklar som behöver källor</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Sidan redigerades senast den 18 november 2024 kl. 14.42.</li> <li id="footer-info-copyright">Wikipedias text är tillgänglig under licensen <a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/deed.sv">Creative Commons Erkännande-dela-lika 4.0 Unported</a>. För bilder, se respektive bildsida (klicka på bilden). Se vidare <a href="/wiki/Wikipedia:Upphovsr%C3%A4tt" title="Wikipedia:Upphovsrätt">Wikipedia:Upphovsrätt</a> och <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">användarvillkor</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Wikimedias integritetspolicy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Om">Om Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Allm%C3%A4nt_f%C3%B6rbeh%C3%A5ll">Förbehåll</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Uppförandekod</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Utvecklare</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/sv.wikipedia.org">Statistik</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Information om kakor</a></li> <li id="footer-places-mobileview"><a href="//sv.m.wikipedia.org/w/index.php?title=Javascript&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobilvy</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-5nd9x","wgBackendResponseTime":145,"wgPageParseReport":{"limitreport":{"cputime":"0.194","walltime":"0.231","ppvisitednodes":{"value":7011,"limit":1000000},"postexpandincludesize":{"value":36719,"limit":2097152},"templateargumentsize":{"value":12375,"limit":2097152},"expansiondepth":{"value":16,"limit":100},"expensivefunctioncount":{"value":6,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":19646,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 195.852 1 -total"," 30.21% 59.159 1 Mall:Faktaruta_programspråk"," 30.00% 58.746 5 Mall:Webbref"," 29.04% 56.876 1 Mall:Faktamall"," 26.92% 52.726 6 Mall:Citation/core"," 26.42% 51.738 5 Mall:Cite_web"," 14.47% 28.330 1 Mall:Fler_källor"," 12.48% 24.444 1 Mall:Källor_metamall"," 11.05% 21.650 1 Mall:Ambox"," 10.52% 20.602 1 Mall:Förväxlas"]},"scribunto":{"limitreport-timeusage":{"value":"0.010","limit":"10.000"},"limitreport-memusage":{"value":1198464,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-869fdccf5d-pbzxc","timestamp":"20241118134235","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Javascript","url":"https:\/\/sv.wikipedia.org\/wiki\/Javascript","sameAs":"http:\/\/www.wikidata.org\/entity\/Q2005","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q2005","author":{"@type":"Organization","name":"Bidragsgivare till Wikimedia-projekten"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2004-04-12T14:25:29Z","dateModified":"2024-11-18T13:42:15Z","headline":"programspr\u00e5k"}</script> </body> </html>