We're a place where coders share, stay up-to-date and grow their careers.
I think #6 is code smell (bad advice). Instead be concise and use parseInt, parseFloat, or Number for typecasting
I think #6 is code smell (bad advice). Instead be concise and use parseInt, parseFloat, or Number for typecasting