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

Skip to content

Commit b1ef827

Browse files
authored
fix(avoid-type-checking-part-1): fix variable name
1 parent 2564bae commit b1ef827

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
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)