Add shorter ES6 version of @jed’s JS solution

https://twitter.com/mathias/status/493668720842006532
https://twitter.com/mathias/status/493673001314156545