JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.

JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a Web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.

JavaScript's use in applications outside Web pages — for example in PDF documents, site-specific browsers, and desktop widgets — is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web applications.

JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.


Falsy Values

JavaScript has a surprisingly large set of falsy values:
Value Type
0 Number
NaN (not a number) Number
'' (empty string) String
false Boolean
null Object
undefined Undefined


Java script has two sets of equality operators: === and !==, and another == and !=. The first works the way you would expect. If two operands are of the same type and have same value, then === produce true and !== produce false. Another operators == and != works good if two operands are of the same type, but if they are of different types, they attempts correct the values. The rules by witch they do that are complicated. There are some interesting examples:
'' == 0 // false
0 == '' // false
0 == '0' // true
false == 'false' // false
false == '0' // true
false == undefined // false
false == null // false
null == undifined // true

Never use == and !=. Instead, always use === and !==.


JavaScript Links



JS Libraries and scripts



Other Links


JavaScript Books



See also

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License