If I have an array in Javascript :
var myArray = [];
myArray.push({ id: 0, value: 1 });
myArray.push({ id: 2, value: 3 });
Is there a way I do not have to define the var { id: 2, value: 3 } again and again?
Something which would allow me to create a variable and use it again like :
var something = { id: tempId, value: tempVal }
and then I can keep pushing new instances of something in the array?