I wrote a this simple code in js.
var n=10;
for (i=1;i=n;i++){
console.log('avinsyh');
}
But the loop executes greater than 2000 and crashing the browser.Why this is happening so?
Note: If I Execute this:
var n=10;
for (i=1;i<n;i++){
console.log('avinsyh');
}
Then the javascritpt outputs the correct results
for (START, LIMIT, INCREMENT)you havefor (START, START, INCREMENT)