How to create a javascript object runtime like following
task{
timestamp:string;
tasklist: array of object
}
How to create a javascript object runtime like following
|
|||||
|
You can use an object initialiser for that:
|
|||
|
This could be one way to do it. Then you can get access to the property in this way:
You could also create an array like this:
and then assign the timestamp as a property:
|
|||
|
and then add task list objects like:
or:
|
|||
|