What’s the difference between “Array()” and “[]” while declaring a JavaScript array?
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 to the constructor, you will get an array of that length: To illustrate the different ways to create an array: Another difference is that when … Read more