Saturday, March 1, 2014

About 

JavaScript is a dynamic, , prototype-based, weakly typed  commonly used for scripting in web browsers. Despite the name, it is unrelated to the Java programming language and shares only superficial similarities.
It runs on nearly every OS, and a JavaScript engine is included in almost every mainstream web browser. 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 with Sun Microsystems at the time.
Standalone JavaScript engines or interpreters are available as well:
  • Mozilla's SpiderMonkey was the first JavaScript engine ever written, currently used in Mozilla Firefox.
  • V8, Google's JavaScript interpreter, is used in Google Chrome,  (a platform which enables server-side applications to be written in JavaScript) and other projects.
  • Windows includes a JavaScript variant in its Windows Script Host .
  • Mozilla also offers Rhino, an implementation of JavaScript built in , typically embedded into Java applications to provide scripting to end users.
  • WebKit (except for the Chromium project) implements the JavaScriptCore engine .
The Mozilla Developer Network contains good documentation on JavaScript.
JavaScript is typically used to manipulate the Document Object Model (DOM) and Cascading Style Sheets (CSS) within the browser, offering user interface scripting, animation, automation, client-side validation, and much more.
However, with the recent emergence of frameworks such as Node.js, JavaScript can now be used to write server-side applications.

Nomenclature

People often use the term JavaScript informally. The language and the term originated from Netscape. ECMAScript, JavaScript, and JScript are terms that are easy to confuse.
ECMAScript was developed as a standardization of Netscape's JavaScript and Microsoft's independently-developed JScript. The canonical reference is the ECMA-262 Language Specification. While JavaScript and JScript aim to be compatible with ECMAScript, they also provide additional features (and other deviations) not described in the ECMA specifications. Other implementations of ECMAScript also exist.
The differences today for those who use JavaScript are negligible; people generally do not distinguish the JavaScript and JScript variations from ECMAScript.

When asking a JavaScript question, you should:

  1. Isolate the problematic code and reproduce it in an online environment such as jsFiddle or JS Bin.
  2. If a library or framework is used, then tag the  with the appropriate tags:  for jQuery, for Prototype,  for MooTools, and so on. However, if a framework is not used or necessary, do not include these tags.
  3. Mention which browser the code is having problems on, and what error messages, if any, were thrown by the browser. If the question is browser-specific, use tags , etc.
  4. Only tag the question as  or  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.

Learning JavaScript

Useful Tools

  • Firebug Add-on for Firefox
  • Developer Tools for IE
  • Chrome Developer/Debug Tools for Chrome

Interactive JavaScript learning

Wisdom from the Stack

Useful links

Free JavaScript Programming Books


Frequently Asked Questions

Find some answers to some of the more frequently asked questions about JavaScript and related technology below.
Q: I have this JSON structure, how can I access property x.y.z?
A: Access / process (nested) objects, arrays or JSON
Q: I'm adding events in a for loop but all handlers do the same thing, why?
A: Event handlers inside a Javascript loop - need a closure?
Q: I want to compare something against multiple values, is there an easy way to do it?
A: Concise way to compare against multiple values
Q: How can I pass a PHP array to JavaScript?
A: Pass a PHP array to a JavaScript function
Q: How to set up proper inheritance?
A: Objects don't inherit prototyped functions
Q: How do JavaScript closures work?
A: How do JavaScript closures work?
Q: Why does setTimeout() inside a for loop always use the latest value?
A: setTimeout in a for-loop and pass i as value
Q: How to return the response from an AJAX call from a function?
A: How to return the response from an AJAX call?
Q: Why don't my handlers hooked up in a loop work correctly, and what can I do about it?
A: http://stackoverflow.com/a/16794762/157247
Q: How can I get query string values?
A: How can I get query string values in JavaScript?
Q: What does “use strict” do in JavaScript?
A: What does "use strict" do in JavaScript, and what is the reasoning behind it?
Q: How can I make a redirect page in jQuery/JavaScript?
A: How can I make a redirect page in jQuery/JavaScript?
Q: How to sort an array of objects by a property value?
A: Sorting objects in an array by a field value in JavaScript
Q: I'm adding elements with JavaScript or jQuery at a later point and adding events but they're not firing, why?
A: You might want event delegation.

More information:

Chat Room

No comments: