April 22, 2006

April 06 Meeting - String, Math and Date Object

Other common objects in JavaScript are the String, Math and Date object. These objects are known as native objects as opposed to previously discussed objects (Form, Image, Element) which are host objects. The difference is that host objects are provided by the environment of the web browser and native objects are provided by JavaScript.

The String object provides properties and methods to get or modify information about strings. The Math object is used for mathematical purposes to give you the values of certain mathematical constants (pi, square root, absolute value, random number). The Date object is another predefined object that enables you to get certain time values (day, month, year).