- Debug your JavaScript code (see Creative, MDN, Google, & MSDN).
Debug your JavaScript code (see Creative, MDN, Google, & MSDN).
- Isolate the problematic code and reproduce it in a Stack Overflow code snippet or an external online environment such as JSFiddle, JS Bin or PasteBin (remember to also include the code in the question itself). When possible, prefer to use Stack Overflow code snippets over external sites.
Isolate the problematic code and reproduce it in a Stack Overflow code snippet. You may use an external site such as JSFiddle, JS Bin, or Codeply, but you must also include your code in the question itself.
- If a library or framework is used, then tag the question with the appropriate tags: jquery for jQuery, prototypejs for Prototype, mootools for MooTools, and so on. However, if a framework is not used or necessary, do not include these tags.
If you are using a library or framework and it is relevant to your problem, tag the question appropriately: jquery for jQuery, vue.js for Vue, reactjs for React, etc.
- If the issue is client-side, mention which browser the code is having problems on, and what error messages, if any, were thrown by the browser. Use the Developer Tools for your browser (see "Useful Tools" below) to see these messages. If the question is browser-specific, use tags firefox, google-chrome, internet-explorer, opera, safari, microsoft-edge, opera-mini etc.
If the issue is client-side, attempt to reproduce it on other browsers. Mention in the question which browser the code is having problems on, and what error messages, if any, were found in the browser's console. Use the Developer Tools for your browser (see "Useful Tools" below) to see these messages. If the question is browser-specific, use tags firefox, google-chrome, internet-explorer, opera, safari, microsoft-edge, etc.
- Only tag the question as css or html if you are asking about an issue that concerns the combination of one of those with JavaScript and could only be answered with information specifically regarding either of those subjects.
Only tag the question as css or html if you are asking about an issue that concerns the combination of one of those with JavaScript and could only be answered with information specifically regarding either of those subjects.
JavaScript runs on nearly every modern operating system, and an engine is included in all mainstream web browsers. Developed in 1995 by Brendan Eich at Netscape Communications, it was originally called LiveScript but was renamed to JavaScript due to Netscape's friendly relationship withthe popularity of Sun Microsystems (creators of's Java) language at the time.
Stand-alone JavaScript engines or interpreters are available as well, includingimplementations include:
Client-side JavaScript is typically used to manipulate the Document Object Model (DOM) and Cascading Style Sheets (CSS) within the browser. This allows user interface scripting, animation, automation, client-side validation and more.
MostAll modern browsers implementwith JavaScript based on the ECMAScript 6 specification, although some fail to implement some ES6 features. However, older browsers such as Internet Explorer 8support implement the ECMAScript 36 specification, which does not contain functions such as Function.prototype.bind or even JSON.parse, among others. You can see the current browser support of ES6 features
The current version of ECMAScript is ECMAScript 12, properly known as ECMAScript 2021, which was published in June 2021. Most modern browsers provide full support for this standard. You can see the current browser support of ES12 features at Can I Use?
window.onload = function() {
alert('Hello World!');
};
window.onload = function() {
alert('Hello World!');
};