Skip to content

Commit c90b109

Browse files
Add an underscore to "Use explanatory variables"
This makes the destructuring a little more readable
1 parent 5f8daa0 commit c90b109

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
@@ -125,7 +125,7 @@ saveCityZipCode(
125125
```javascript
126126
const address = "One Infinite Loop, Cupertino 95014";
127127
const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;
128-
const [city, zipCode] = address.match(cityZipCodeRegex) || [];
128+
const [_, city, zipCode] = address.match(cityZipCodeRegex) || [];
129129
saveCityZipCode(city, zipCode);
130130
```
131131

0 commit comments

Comments
 (0)