When defining data schemas in JavaScript and nesting the data inside arrays or objects what's the main advantage of choosing one over another ?
Does nesting objects inside an array have a different effect then nesting arrays inside objects ?
Is it arbitrary choosing one to nest the other inside or rather is it done quite on purpose in some cases ?
The question arose upon reading the fourth chapter of eloquent JavaScript.