minor fixes
This commit is contained in:
parent
e9686467e6
commit
9705a09ca7
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ alert(user ?? "Anonymous"); // John
|
|||
|
||||
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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue