JavaScript is a high-level, interpreted programming language that runs in every modern browser and is the scripting language of the Web. It was created by Brendan Eich in 1995 while he was working at Netscape, and the language went through several early names—Mocha, then LiveScript—before it became JavaScript. JavaScript follows the ECMAScript specification, which defines the core features of the language. The latest stable version of that standard is ES2023, and JavaScript engines implement every ES feature plus additional browser-specific ones.
To run JavaScript in a web page, you embed it using the <script> tag. The script can be written inline directly between the opening and closing tags, or it can be loaded from an external file with an attribute like <script src="script.js"></script>. Placing the script just before the closing </body> tag is a common best practice because it lets the browser parse the HTML first, improving perceived performance. For day-to-day work, console.log() is the developer's main debugging tool: it prints messages to the browser console and accepts multiple arguments of any type, such as console.log('Hello', 42);.