PDA

View Full Version : JS An object property that is an array?


Seymour Clufley
07-02-2009, 11:58 PM
Hi,

How would you go about achieving an array within an object?

var myObj = { title:"Mr", surname:"Jones", age:47, children:Array(5) }

It's that last entry I don't know how to do. Is it possible?

Thanks for reading,
Seymour.

Mickel-M
07-05-2009, 07:09 AM
I think the function for arrays in JS is new Array()