Skip to content

Commit

Permalink
Merge pull request #297 from Risto-Mcintosh/patch-1
Browse files Browse the repository at this point in the history
Fixed a small typo
  • Loading branch information
ryanmcdermott authored Feb 12, 2020
2 parents e6f9934 + c90b109 commit b8b16eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ saveCityZipCode(
```javascript
const address = "One Infinite Loop, Cupertino 95014";
const cityZipCodeRegex = /^[^,\\]+[,\\\s]+(.+?)\s*(\d{5})?$/;
const [, city, zipCode] = address.match(cityZipCodeRegex) || [];
const [_, city, zipCode] = address.match(cityZipCodeRegex) || [];
saveCityZipCode(city, zipCode);
```

Expand Down

0 comments on commit b8b16eb

Please sign in to comment.