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.
Frontend Web Developer -
Programming Content Creator -
160k+ Followers On Linkedin -
140k+ Followers On Instagram -
Follow me for the most amazing content related to Programming & Web Development 💎
I love how you've included
[...new Set(array)]3 times. By the way,isNaNautomatically tries to parse the string into a number, and returns false when failing, so no need to wrap the string inparseFloat.That's helpful, Thanks for sharing 🙌