minor fixes

This commit is contained in:
Ilya Kantor 2020-09-24 14:20:26 +03:00
parent e9686467e6
commit 9705a09ca7

View file

@ -41,7 +41,7 @@ alert(user ?? "Anonymous"); // John
We can also use a sequence of `??` to select the first defined value from a list. We can also use a sequence of `??` to select the first defined value from a list.
Let's say we a user's data in variables `firstName`, `lastName` or `nickName`. All of them may be undefined, if the user decided not to enter a value. Let's say we have a user's data in variables `firstName`, `lastName` or `nickName`. All of them may be undefined, if the user decided not to enter a value.
We'd like to display the user name using one of these variables, or show "Anonymous" if all of them are undefined. We'd like to display the user name using one of these variables, or show "Anonymous" if all of them are undefined.