Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 667ff35

Browse files
Merge pull request ryanmcdermott#10 from Yahkob/patch-2
Use explanatory variables bad and good examples should match ([1] + …
2 parents dcbca43 + 071dfdc commit 667ff35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ for (var i = 0; i < MINUTES_IN_A_YEAR; i++) {
9595
**Bad:**
9696
```javascript
9797
let cityStateRegex = /^(.+)[,\\s]+(.+?)\s*(\d{5})?$/;
98-
saveCityState(cityStateRegex.match(cityStateRegex)[0], cityStateRegex.match(cityStateRegex)[0]);
98+
saveCityState(cityStateRegex.match(cityStateRegex)[1], cityStateRegex.match(cityStateRegex)[2]);
9999
```
100100

101101
**Good**:

0 commit comments

Comments
 (0)