DEV Community

Discussion on: 20 Killer JavaScript One-Liners That’ll Save You Hours of Coding 🤯🔥

Collapse
 
codingjlu profile image
codingjlu

I love how you've included [...new Set(array)] 3 times. By the way, isNaN automatically tries to parse the string into a number, and returns false when failing, so no need to wrap the string in parseFloat.

Collapse
 
rammcodes profile image
Ram Maheshwari ♾️

That's helpful, Thanks for sharing 🙌