I was wondering, since I'm about to embark on an heavy object array project. As I was studying arrays, I was wondering if Object arrays are treated the same?
like:
This probably doesn't work does it?
How do you go about adding on to existing objects, or is that a downside to using object arrays that its static and can't be updated, but completely redefined?
And if so, how should I go about taking an existing object array, and new array elements to add to the old, and combine?
like:
Code:
var arr1 = [];
arr1.push(1,2,3);
// arr1 = [1,2,3];
var obj1 = {};
obj1.push(id:1);
// obj1 = {id:1};
How do you go about adding on to existing objects, or is that a downside to using object arrays that its static and can't be updated, but completely redefined?
And if so, how should I go about taking an existing object array, and new array elements to add to the old, and combine?
Comment