Skip to content

Commit 5cdf7a8

Browse files
Merge pull request ryanmcdermott#22 from floriangosse/patch-1
fix(avoid-type-checking-part-1): fix variable name
2 parents 5d3bd8a + b1ef827 commit 5cdf7a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,9 @@ The first thing to consider is consistent APIs.
789789
**Bad:**
790790
```javascript
791791
function travelToTexas(vehicle) {
792-
if (obj instanceof Bicycle) {
792+
if (vehicle instanceof Bicycle) {
793793
vehicle.peddle(this.currentLocation, new Location('texas'));
794-
} else if (obj instanceof Car) {
794+
} else if (vehicle instanceof Car) {
795795
vehicle.drive(this.currentLocation, new Location('texas'));
796796
}
797797
}

0 commit comments

Comments
 (0)