en.javascript.info
en.javascript.info copied to clipboard
change `user` to `userAdmin`
I found one typo in the topic optional chaining.
snippet:
let userAdmin = {
admin() {
alert("I am admin");
}
};
In the below phrase:
Here, in both lines we first use the dot (
userAdmin.admin) to get theadminproperty, because we assume that theuserAdminobject exists, so it's safe read from it.
user should be userAdmin cause the obj's name is userAdmin not user.
PS: Thank you for these great docs! A lot of information are well cleared.
Closes: #3499