ES6 One Liners to Show Off

This is a guest post by Hemanth H.M and was originally published on

Here is a collection of ES6 one liners to show off!

NodeList to Array:

Explore Javascript Training Courses

Unique Arrays:


Swap like a snake:

Max in array?:

List comprehension:



Is it a hidden file?:

Repeat with me:

If you are using some, please do let me know!

Hope it blew your mind! 😉


Hemanth H.M
Hemanth is a Computer Polyglot, CLI + WEB ♥'r who writes at