Here is an example of pushing in three objects at once which is perfectly legit.
var foo = [];
var bar = {
yin: 13,
yang: 23
};
var baz = {
yin: 27,
yang: 42
};
var qux = {
yin: 69,
yang: 86
};
foo.push(bar, baz, qux);
console.log(foo);
No comments:
Post a Comment