{"id":20641,"date":"2020-01-28T11:43:24","date_gmt":"2020-01-28T11:43:24","guid":{"rendered":"https:\/\/www.arimetrics.com\/glosario-digital\/javascript"},"modified":"2026-09-14T13:20:11","modified_gmt":"2026-09-14T13:20:11","slug":"javascript","status":"publish","type":"encyclopedia","link":"https:\/\/www.arimetrics.com\/en\/digital-glossary\/javascript","title":{"rendered":"JavaScript"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"javascript\" class=\"boxpad wp-image-14498 size-full alignright\" height=\"300\" src=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/javascript.png\" style=\"margin-top:0;\" width=\"300\" srcset=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/javascript.png 300w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2020\/01\/javascript-150x150.png 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><strong>Definition:<\/strong><\/p>\n<p><strong>JavaScript<\/strong> is a programming language used to add interactivity to web pages and develop applications. It can respond to user actions, modify content, work with forms, and request information without reloading the entire page.<\/p>\n<p>Although it is mainly known for its use in browsers, it can also run on servers and in other environments. JavaScript and Java are different languages: the similarity in their names does not mean that they use the same code or that one is a version of the other.<\/p>\n<p>Running code in the browser allows certain operations to take place on the user&#8217;s device, but it does not eliminate downloads or communication with the server. Performance depends on the code, resources, and work performed by the application.<\/p>\n\n<h2>JavaScript language features<\/h2>\n<p>JavaScript is a high-level, dynamic, prototype-based language. It supports different programming styles, including imperative, functional, and object-oriented programming. Functions can be assigned to variables, passed as arguments, and returned as results.<\/p>\n<p>It is dynamically typed: a variable can refer to values of different types during execution. Certain operations also perform implicit conversions, so it is important to distinguish between numbers, strings, and other values when interpreting a result.<\/p>\n<p>Alongside <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/html\">HTML<\/a> and <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/css\">CSS<\/a>, JavaScript is one of the fundamental technologies of the web. HTML structures content, CSS defines its presentation, and JavaScript allows behavior to be programmed. Modern browsers include engines to run it without installing a dedicated plugin, although compatibility with each feature depends on the version.<\/p>\n<p>Engines can combine interpretation and compilation during execution, known as JIT compilation. Therefore, describing JavaScript solely as an interpreted language does not explain all the strategies used to run its code.<\/p>\n<p>The language includes objects and functions for working with text, arrays, dates, and regular expressions. The <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/api\">APIs<\/a> provided by the environment extend these capabilities: the DOM allows a page&#8217;s document to be queried and modified, while other interfaces allow network requests. These capabilities are not all part of the core language and are not available in the same way in every environment.<\/p>\n<h2>Origin and evolution of JavaScript<\/h2>\n<p>Brendan Eich created JavaScript in 1995 while working at Netscape. During development, it was called Mocha and LiveScript before adopting the name JavaScript, in a commercial context linked to Java&#8217;s popularity. Its design incorporated influences from languages such as Self and Scheme, along with syntax familiar to programmers using the C family of languages.<\/p>\n<p>Its evolution includes these six milestones and developments:<\/p>\n<ul>\n<li><strong>ECMAScript, from 1997:<\/strong> standardization at Ecma International led to ECMA-262, the ECMAScript language specification on which JavaScript is based.<\/li>\n<li><strong>AJAX, in the 2000s:<\/strong> combining JavaScript with asynchronous requests to update parts of a page without reloading it entirely became popular. Although the name mentions XML, other formats, such as JSON, can also be exchanged.<\/li>\n<li><strong>Node.js, from 2009:<\/strong> this environment expanded JavaScript adoption on servers and in development tools. It was not the first use of the language outside the browser.<\/li>\n<li><strong>UI libraries and frameworks:<\/strong> tools such as Angular, React, and Vue made it easier to organize complex applications. They are not mandatory components of the language and do not, by themselves, guarantee greater speed.<\/li>\n<li><strong>ECMAScript 2015 or ES6:<\/strong> introduced features such as modules, classes, promises, and the let and const declarations. These additions changed the possibilities for organizing and writing code.<\/li>\n<li><strong>Later editions:<\/strong> the standard continues to evolve through new editions. Publication of a feature and its availability in different engines do not necessarily coincide.<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\" target=\"_blank\" rel=\"noopener\">JavaScript reference on MDN<\/a> provides information about the language and compatibility of its features, distinguishing them from the interfaces supplied by the browser.<\/p>\n<h2>What JavaScript is used for<\/h2>\n<p>On a website, JavaScript can control menus, update information, respond to clicks or changes in fields, and perform initial form checks. These checks help the user but do not replace server-side data validation.<\/p>\n<p>Through <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/ajax\">AJAX<\/a> techniques and APIs such as Fetch, it can send and receive information without reloading the entire document. Access to resources remains subject to browser security rules and service permissions; running a script does not grant direct access to any data on the server.<\/p>\n<p>Outside the browser, it is used to program servers with Node.js, develop tools, and build desktop or mobile applications through specific environments. It can also be used in video games, certain PDF documents, and <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/widget\">widgets<\/a>, depending on the features supported by the platform.<\/p>\n<p>When a script is downloaded and executed depends on how it is incorporated into the page. Not all code is interpreted as the HTML arrives: scripts can be deferred, loaded asynchronously, or use modules. This organization affects when their functions become available and how they influence the page&#8217;s presentation and responsiveness.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Definition: JavaScript is a programming language used to add interactivity to web pages and develop applications. It can respond to user actions, modify content, work with forms, and request information without reloading the entire page. Although it is mainly known for its use in browsers, it can also run on servers and in other environments. [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"template":"","encyclopedia-tag":[1273],"class_list":["post-20641","encyclopedia","type-encyclopedia","status-publish","hentry","encyclopedia-tag-web-programming"],"_links":{"self":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia\/20641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia"}],"about":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/types\/encyclopedia"}],"author":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/users\/6"}],"wp:attachment":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media?parent=20641"}],"wp:term":[{"taxonomy":"encyclopedia-tag","embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia-tag?post=20641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}