Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Firstly, for...in is used to enumerate over object properties, not to iterate through arrays used to enumerate over object properties, not to iterate through arrays. You should use a traditional for loop for this.

Secondly, you could probably refine your console logging portion a bit. It may not have any impact to application performance, but it would make your console look prettier.

$('body').on('click', '#logReport', function() {
 var i, j, k, l;
 console.group("Live Links:");
 for (i=0, j=liveLinks.length; i<j; i++) {
 console.log(liveLinks[i]);
 }
 console.groupEnd();
 console.group("Dead Links:");
 for (k=0, l=deadLinks.length; k<l; k++) {
 console.log(deadLinks[k]);
 }
 console.groupEnd();
});

As far as I know, this works for both Google Chrome and Mozilla Firefox (FireBug). See here for more information.

Firstly, for...in is used to enumerate over object properties, not to iterate through arrays. You should use a traditional for loop for this.

Secondly, you could probably refine your console logging portion a bit. It may not have any impact to application performance, but it would make your console look prettier.

$('body').on('click', '#logReport', function() {
 var i, j, k, l;
 console.group("Live Links:");
 for (i=0, j=liveLinks.length; i<j; i++) {
 console.log(liveLinks[i]);
 }
 console.groupEnd();
 console.group("Dead Links:");
 for (k=0, l=deadLinks.length; k<l; k++) {
 console.log(deadLinks[k]);
 }
 console.groupEnd();
});

As far as I know, this works for both Google Chrome and Mozilla Firefox (FireBug). See here for more information.

Firstly, for...in is used to enumerate over object properties, not to iterate through arrays. You should use a traditional for loop for this.

Secondly, you could probably refine your console logging portion a bit. It may not have any impact to application performance, but it would make your console look prettier.

$('body').on('click', '#logReport', function() {
 var i, j, k, l;
 console.group("Live Links:");
 for (i=0, j=liveLinks.length; i<j; i++) {
 console.log(liveLinks[i]);
 }
 console.groupEnd();
 console.group("Dead Links:");
 for (k=0, l=deadLinks.length; k<l; k++) {
 console.log(deadLinks[k]);
 }
 console.groupEnd();
});

As far as I know, this works for both Google Chrome and Mozilla Firefox (FireBug). See here for more information.

Source Link

Firstly, for...in is used to enumerate over object properties, not to iterate through arrays. You should use a traditional for loop for this.

Secondly, you could probably refine your console logging portion a bit. It may not have any impact to application performance, but it would make your console look prettier.

$('body').on('click', '#logReport', function() {
 var i, j, k, l;
 console.group("Live Links:");
 for (i=0, j=liveLinks.length; i<j; i++) {
 console.log(liveLinks[i]);
 }
 console.groupEnd();
 console.group("Dead Links:");
 for (k=0, l=deadLinks.length; k<l; k++) {
 console.log(deadLinks[k]);
 }
 console.groupEnd();
});

As far as I know, this works for both Google Chrome and Mozilla Firefox (FireBug). See here for more information.

default

AltStyle によって変換されたページ (->オリジナル) /