Fix typo in 1.4.7 (optional chaining)

This commit is contained in:
Vse Mozhe Buty 2020-10-20 20:08:15 +03:00 committed by GitHub
parent 971a32e114
commit 9b2f866a39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ let user = {}; // user has no address
alert(user.address ? user.address.street ? user.address.street.name : null : null); alert(user.address ? user.address.street ? user.address.street.name : null : null);
``` ```
That's just awful, one may even problems understanding such code. That's just awful, one may even have problems understanding such code.
Don't even care to, as there's a better way to write it, using the `&&` operator: Don't even care to, as there's a better way to write it, using the `&&` operator: