Standard Built-in Objects ?

Standard Built-in Objects :
All programming languages have internal (or built-in) objects that create the essential functionality of the language. Internal objects are the foundation of the language in which you write custom code that powers custom functionality based on your imagination. JavaScript has many internal means intrinsic objects that define it as a language.

The built-in objects can be divided into three groups:

Data wrapper objects— Object , Array , Function , Boolean , Number , and
String . These objects correspond to the different data types in JavaScript.
Basically, there is a data wrapper object for each different value returned by
typeof with the exception of “undefined” and “null”.

Utility objects—These are Math , Date , RegExp and can come in very handy.

Error objects—The generic Error object as well as other, more specific objects
that can help your program recover its working state when something
unexpected happens.

To create a new empty object you can use the literal notation
or the Object() constructor function. The following two lines are same :

  var o = {};
  var o = new Object();

An empty object is not completely useless because it already contains some methods
and properties. Few are :

• o.constructor property returns the constructor function
• o.toString() is a method that returns a string representation of the object
• o.valueOf() returns a single-value representation of the object, often this is
the object itself

I am showing you these methods in action as,first create an object :

var  o = new Object();
> o.constructor
  function Object() { [native code] }
> o.toString()
  "[object Object]"
> o.valueOf()===o
true

More Info: MDN

Refer Book: Book

About

My Name is Dileep Singh, Noder, Javascript Lover & NoSql Developer, Fitness Freak, Love to travel new places, learning photography & Music Manic ♯ ♩ ♬

Posted in Javascript Tagged with: