Uploaded October 2023 | Updated November 2026, 3 hours ago
We can convert JavaScript strings to numbers with the Number constructor and the parseInt function, but the fastest and preferred way of converting something into a number is using the Unary Plus.
π Support me on Patreon β patreon.com/davegray
π» Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
π Discord β discord.gg/neKghyefqh
π Follow Me On Social Media:
GitHub: github.com/gitdagray
X: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
Blog: https://www.davegray.codes/
We can convert JavaScript strings to numbers with the Number constructor and the parseInt function, but the fastest and preferred way of converting something into a number is using the Unary Plus.
π Support me on Patreon β patreon.com/davegray
π» Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
π Discord β discord.gg/neKghyefqh
π Follow Me On Social Media:
GitHub: github.com/gitdagray
X: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray
Blog: https://www.davegray.codes/










