Re: Objects in Javascript For instance Array, Date, Number, Boolean, and String objects can be created this way as in the example below. Most objects may be created this way except for the Math object which cannot be instantiated (an instance of it may not be created).
ratings = new Array(6,9,8,4,5,7,8,10)
var home = new String("Residence")
var futdate = new Date()
var num1 = new Number()
String objects may also be created as follows:
var string = "This is a test."
__________________ With,
J. Jeyaseelan Everything Possible |