Skip to content

Commit 4726388

Browse files
committed
changed ?. to . as it was designed to cause a typeError
1 parent 50ef836 commit 4726388

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
@@ -1910,7 +1910,7 @@ Most of these features already supported by some browsers and try out with babel
19101910
}
19111911
};
19121912

1913-
console.log(vehicle.car?.name); // TypeError: Cannot read property 'name' of undefined
1913+
console.log(vehicle.car.name); // TypeError: Cannot read property 'name' of undefined
19141914

19151915
console.log(vehicle.car?.name); // Undefined
19161916
console.log(vehicle.car?.speed); // Undefined

0 commit comments

Comments
 (0)