
7 JavaScript hacks for ES6 hipsters - tal_berzniz
https://hackernoon.com/javascript-hacks-for-es6-hipsters-67d633ce8ace
======
ng12
Why are these "hipster hacks"? They're really important language features
everyone should be using.

Side note: has anybody ever had to actually swap variables in production code?
I thought it was just a fizzbuzz interview question.

~~~
mabynogy
> has anybody ever had to actually swap variables in production code?

I did that today to swap the content of two plain objects without altering the
references.

It was in Lua but I'll probably to that in JS too tomorrow.

------
ix-hispana
The ...thing still feels like magic to me.

The rest are pretty common, I would not consider reduce() or passing an object
to a function instead of separate arguments hipster hacks at all. "Options"
objects are ubiquitous in corporate SDKs like AWS and Azure. They are the
opposite of hipster.

~~~
tal_berzniz
Options indeed was always a common use case but made the function declaration
less verbose. Now we can have the best of both worlds

