What's wrong with var x = new Array();

javascript, jslint

Solution

Crockford doesn't like `new`. Therefore, JSLint expects you to avoid it when possible. And creating a new array object is possible without using `new`....

Problem

In JSLint, it warns that ``` var x = new Array(); ``` (That's not a real variable name) should be ``` var result = []; ``` What is wrong with the 1st syntax? What's the reasoning behind the suggestion?

Original source

Related problems