Tuesday, January 25, 2011

Data types in JavaScript

As in any other programming language, JavaScript also has Primitive data types and non-primitive data types. In case you didn't know primitive data types are predefined data types which comes with the language. Non-primitive are data types which are defined by the programmer.

Data types in JavaScript
  • Primary data types
    • Number
    • String
    • Boolean
  • Composite data types
    • Object
    • Function
JavaScript consists of lot of objects in it. Following diagram shows some of them. (source)

Array
Array is a high-level, list like object. Array prototype includes methods to perform operation on it.

Array. forEach
Array.prototype.map()
Creates a new array after manipulating the array elements from the callback function which is passed to map.
There are lot of other methods available for use in Array.prototype
Resources
Powered by Blogger.


Software Architect at Surge Global/ Certified Scrum Master

Experienced in Product Design, Software Engineering, Team management and Practicing Agile methodologies.

Search This Blog

Facebook