When it comes to writing empty arrays in JavaScript, is there a difference between declaring them inside the method like this:
var example = {
calcMethod: function() {
this.array1 = [];
this.array2 = [];
}
};
and declaring them as object parameters like this?
var example = {
array1 : [],
array2 : []
};
Both approaches will allow you to eventually fill these arrays with data.