var st = new String("Teachsomebody");
Strings have some common properties like a constructor which provides a reference to the string function from which the object is being created,
length() property providing the number of characters or length of the string and also the
Prototype() property which enables the addition of procedures and properties to the object.
Arrays are for storing multiple instances or values by a single variable. Arrays store a collection of values, characters or elements having the same type in a fixed-size successive pattern. The following syntax presents a simple way of creating a new array object
var vegetables = new Array( "tomatoes", "carrots", "onions" );
or by using square brackets:
var vegetables = [ "tomatoes", "carrots", "onions" ];
Arrays also have some properties like a constructor which provides a reference to the array function from which the object is being created,
length() property providing the number of elements of the array and also the
Prototype()property which enables the addition of procedures and properties to the object. A list of the methods of the Array object along with their descriptions are given in the section of built-in functions.
Given below is the syntax for creating a number object
var val = new Number(number);
The Boolean Object represent only two values which are either true or false or can be represented as 1 or 0. If the value parameter does not consist of any valid value, then the object holds the initial value of false.
The syntax of creating a Boolean object is given below
var x = new Boolean(value);
The two properties of the Boolean object are
prototype() similar to the global objects as explained above.