JSlint doesn't like the use of Array constructors and there are no JSLint options for allowing them. Therefore, to create an Array of length n, the following is not allowed:
var arr = new Array(n);
Is the below the only way I can get around this?
var arr = [];
arr.length = 5;
In normal circumstances this is not a big deal (using two lines of code instead of one), but I regret not being able to use the concise string multiplier hack:
function repeat(str, times) {
return new Array(times + 1).join(str);
}