JavaScript

programming language
verifiedCite
While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions.
Select Citation Style
Feedback
Corrections? Updates? Omissions? Let us know if you have suggestions to improve this article (requires login).
Thank you for your feedback

Our editors will review what you’ve submitted and determine whether to revise the article.

Also known as: JS, LiveScript, Mocha
Related Topics:
computer scripting language

News

JavaScript, computer programming language that is a mainstay of web development, enabling the creation of complex features and interactivity in websites and web applications, as well as other use cases. JavaScript is a scripting language, meaning that its code is interpreted (i.e., translated into machine code) at runtime rather than when it is compiled by an application or engine.

JavaScript follows the ECMAScript standards set by Ecma International, an industry organization that has created technology standards since 1961. Despite this common standard, JavaScript implementation varies between Internet browsers because of the different engines they use to interpret and execute JavaScript code. The Oracle Corporation owns the trademark on the term “JavaScript,” but this is in reference to the Java language, rather than JavaScript specifically.

JavaScript is one of three core languages, along with HTML and CSS, used to design websites. HTML provides a website with its structure and hierarchy and enables its content to be rendered correctly, and CSS controls the stylistic presentation of the website’s content (elements such as color, layout, and responsiveness). JavaScript allows websites to be rendered dynamically and interact with users’ actions. JavaScript code alters HTML and CSS code to make a website interactive rather than a static page. For instance, JavaScript enables features such as a pull-down menu, embedded media files, and form validation. JavaScript also allows a user to access some of the site’s content by selecting filtering criteria (for example, selecting a genre or a director to filter content on a movie streaming site).

JavaScript is primarily a client-side scripting language, meaning that its code is read and executed by a web browser, such as Google Chrome or Firefox, rather than by a server. The language has become truly ubiquitous, with more than 98 percent of websites reported to have been using JavaScript in 2022. But while client-side scripting (and website interactivity) remains a crucial use of JavaScript, it has evolved beyond the browser. Since the 2009 release of Node.js, an open-source server environment, JavaScript has become a popular server-side scripting language, enabling it to run not just in a browser but also on a server. This opened many new applications for JavaScript, from running the database that powers the back-end of a website to creating full-fledged desktop applications. JavaScript has become an important technology in mobile development, games development, the programming of Internet of things devices, and serverless computing architecture.

The introduction of JavaScript web frameworks, such as AngularJS and REACT.js, also contributed to its popularity and reach. Such frameworks simplify the process of creating responsive web applications and websites and improve their efficiency. For example, REACT.js, one of the most popular front-end frameworks, allows websites and web applications to dynamically load required content rather than reloading the entire code after each user interaction. This approach also speeds up development, as this code can be reused in different part of the site or even reused to develop a whole new website or application.

André Munro