I have have some js code; in that I ran the js lint. I have this error: ‘currentApple’ is already defined Do I need to remove var currentApple from else to make it work? I’m providing my code below: Answer
Tag: jslint
How to initialize an array’s length in JavaScript?
Most of the tutorials that I’ve read on arrays in JavaScript (including w3schools and devguru) suggest that you can initialize an array with a certain length by passing an integer to the Array constructor using the var test = new Array(4); syntax. After using this syntax liberally in my js files, I ran one of the files through jsLint, and