Properties are the values associated with an Object.
NOTE: ”. length” is a property which is associated with a string Object.
Methods could be said as the action which can be performed on an object.
NOTE: “.link()” is an action which is used to make a string Object into a link.
A string Object is used to manipulate a stored piece of Text.
String Object Properties: .length, .prototype
String Object Methods: big(), toUpperCase(), match();
Syntax for creating a String object:
var myStr=new String(string);
Date Object is used to work with dates and times.
Date Object Properties: .constructor, .prototype
Date Object Methods: Date(), getDate(), getDay()
Syntax for creating a Date object:
var myDate=new Date();
Array Objects are used to store multiple values in a single variable. An Array can hold more than one value at a time.
Array Object Properties: .length, .prototype,
Array Object Methods: .concant(), .join()
Syntax for creating an Array object:
var myColors=new Array("red”,”blue","green")
Boolean Object is used to convert a non-boolean value into a Boolean value. ( True /False).
Boolean Object Properties: .constructor, .prototype
Boolean Object Methods: .toString(),.valueOf()
Syntax for Creating a Boolean Object:
Var myBoolean = new Boolean(value);
Math Objects are used to perform mathematical tasks.
Math Object Properties: .SQRT1_2, .SQRT2
Math Object methods: .round(x),.max(x,y)
Syntax for Creating a Math Object:
All properties and methods of Math can be called by using Math as an object without creating it, because math object is not a constructor.
The RegExp Obejct is used for “What” to search in the “text”. RegExp is the short for Regular Expression. We can use to search for a pattern inside a text. RegExp is used to strore a pattern.
RegExp Object Properties: .global, .ignoreCase
RegExp Object Methods: .test(), .exec(), .compile();
Syntax for creating a RegExp Object:
var txt=new RegExp(pattern,attributes); OR var txt=/pattern/attributes;