Echo JS 0.11.0

<~>
amitport 2546 days ago. link 5 points
(pros/cons)
(-) requires training - this syntax may be unfamiliar/confusing to some people
(-) over-use is very bad - the problems are mentioned in MDN.
(+) when used exactly right - it saves a few characters

IMO, when working in a company/team/open-source-project it's just not worth the effort and risk (of over-use).


You can do something like this instead (a little more verbose but more readable for humans and compilers):
```
{
  const {loadEventEnd, navigationStart} = window.performance.timing;
  console.log(loadEventEnd - navigationStart);
}
```

Replies

kirilloid 2546 days ago. link 0 point
Whilst I in general agree, when writing into an object, you cannot emulate that easily. But that’s also unpredictable.
One slight typo and you are writing into wrong place. It’s just dangerous in these cases.