This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Combine test cases for 'bad' for loops and case for 'good' for loops - Remove unneeded files - Add comments to test cases
- Loading branch information
1 parent
596f532
commit eebadbc
Showing
10 changed files
with
30 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// for loops without an initializer, termination condition, and incrementor should be updated | ||
while (true) { | ||
console.log(x); | ||
} | ||
|
||
// for loops without an initializer and incrementor should be updated | ||
while (true===true) { | ||
console.log(x); | ||
} | ||
|
||
// for loops with an initializer, termination condition, and incrementor should remain untouched | ||
for(let x = 1; x < 10; x++) { | ||
console.log(x); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// for loops without an initializer, termination condition, and incrementor should be updated | ||
for(;;) { | ||
~~~~~~~ [Prefer `while` loops instead of `for` loops without an initializer and incrementor.] | ||
console.log(x); | ||
} | ||
|
||
// for loops without an initializer and incrementor should be updated | ||
for(;true===true;) { | ||
~~~~~~~~~~~~~~~~~~ [Prefer `while` loops instead of `for` loops without an initializer and incrementor.] | ||
console.log(x); | ||
} | ||
|
||
// for loops with an initializer, termination condition, and incrementor should remain untouched | ||
for(let x = 1; x < 10; x++) { | ||
console.log(x); | ||
} |
File renamed without changes.