What’s the difference between “Array()” and “[]” while declaring a JavaScript array?
What’s the real difference between declaring an array like this: var myArray = new Array(); and var myArray = []; 18 s 18 There is a difference, but there is no difference in that example. Using the more verbose method: new Array() does have one extra option in the parameters: if you pass a number … Read more