Title: JavaScript Content: thumb|The colloquial logo used for JavaScript JavaScript is a high-level programming language that follows the ECMAScript standard. It was originally designed as a scripting language for websites but became widely adopted as a general-purpose programming language, and is currently the most popular programming language in use. JavaScript is usually found running in a web browser as interactive or automated content, ranging from popup messages and live clocks to large web applications. JavaScript is also commonly used in server-side programming through platforms like Node.js, or "embedded" in non- JavaScript applications where the base programming language lacks the high- level functionality that JavaScript offers. Despite the similarities in name and syntax, JavaScript is not related to the programming language Java. Though the names of both languages are trademarks of Oracle Corporation, the two languages follow different design principles, and are actively developed by unrelated organizations. ==Use== JavaScript is typically inserted into HTML when used on the web, either directly in the file in an HTML tag, or linked to a separate file containing the script. JavaScript, as a full featured scripting language, can be used to provide functionality to a website. Examples include: * Using AJAX in order to load content without refreshing the website. * Changing HTML through the Document Object Model * Changing CSS * Validating inputs of forms and sending them. * Tracking users as they move throughout the website. ===Frameworks=== A majority of websites use what is known as a framework. Frameworks may allow programming to be easier as more predefined procedures are defined within it. Such a library is jQuery. ===Beyond web browsers=== JavaScript is also used outside of web browsers. As a scripting language, JavaScript can be used to define the behaviour of applications such as extensions in GNOME Shell. In addition, there are runtime environments for running JavaScript as a server side programming language. Such an environment is Node.js. Electron is a framework which allows graphical applications to be made with web technologies, by running on the Chromium browser and Node.js. ==Syntax== A JavaScript program is made of a collection of instructions called "statements". A semicolon marks the end of a statement, and allows multiple statements to be placed on the same line. However, it is typical to write each statement on its own line to keep a program file readable. Variables can be defined in several ways. In an older version named "ES5", variables are defined using the `var` keyword. In the newer versions after ES5, variables can be defined using `const` for constant variables and `let` for local variables. The value of constant variables cannot be re- declared or reassigned. Variables assigned using `const` or `let` are contained within blocks, while variables assigned using `var` are contained within functions. // ES5 var x = 1; // ES6+ const y = 10; // Cannot be reassigned let t = 5; // Can be reassigned == Examples == The script below prints "Example" on the screen. The lines that start with `//` are comments, which are used to describe the actions of the program. function sayHi  sayHi; // Runs the function sayHi /* This is also a comment, but it can span multiple lines. */ The code above alerts `"Hello " + name`. If you want to put JavaScript in your HTML, you put it between an opening `<script>` and closing `</script>` tag. These tags mean that whatever is between them is a script and not text to be put onto the web page. The script below inserts the numbers 1 through 10 at the bottom of a webpage: The `for` loop makes whatever code is between the ` sayHi; sayBye; * JavaScript is interpreted, but Java, in most cases, must be compiled. This means that JavaScript needs to be run by another computer program (an interpreter), but finished Java can be run as its own program. ==Related pages== * HTML * Ajax (programming) * Java (programming language) * TypeScript