Almost all the code in your examples is either broken, or poster children for everything WRONG with the needlessly cryptic arrow functions, pointlessly redundant Object.keys, and the general lack of knowledge those who seem so ready to embrace these things bring to the table.

Take your Object.keys where you're getting the Key's index in the new Array INSTEAD of the value from the original object! Or your filtering example that doesn't include the variable actually being tested.

Even just the endless pointless "LET for nothing". If you have multiple VAR/LET/CONST in a row, say it ONCE and then comma delimit.

Though a lot of what you're showing here is neat, it all lacks clarity due to being symbol based, and for me still isn't real world deployable since I don't use JS server-side and client side most of my clients STILL (string of expletives omitted) insist on at LEAST IE 11 support, and a few even demand {even stronger list of profanity omitted) IE8 support.

When things like the derpy arrow function throws a parser level error in all versions of IE by their mere presence; though I have used that to my advantage in a few cases as a form of capabilities detection so I can tell clients "the page still works in IE, it just gracefully degrades to not get the bells and whistles"

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store