en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

change `user` to `userAdmin`

Open Namnika opened this issue 2 years ago • 1 comments

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 the admin property, because we assume that the userAdmin object 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

Namnika avatar Jul 19 '23 08:07 Namnika

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 19 '23 08:07 CLAassistant