Don't use parseInt #shorts #programming #javascript

preview_player
Показать описание
#short or #shorts in this video is for converting string to number without using parseInt function of #javascript

🌟 Premium Courses 🌟
Check out 32 hours of Laravel Content at

🔥 DIGITAL OCEAN HOSTING Affiliate

🌟 Gadgets I use 🌟

🌟 Support Me ( I am a full-time YouTube) 🌟

🌟 FOLLOW ME 🌟
Subscribe for New Releases!

(ask me questions!)

--- QUESTIONS? ---

Leave a comment below and I or someone else can help you.
For quick questions you may also want to ask me on Twitter, I respond almost immediately.

Thanks for all your support
Рекомендации по теме
Комментарии
Автор

This is not applicable and useless; why would anybody write this instead of the clear readable parseInt.
If you want to tell people about this just say it but don't say don't use parseInt!

amrelmohamady
Автор

Good old days. ☺ I have used this trick many years ago, before nodejs was even a thing. The performance benefit seems minute but collectively, on an operation intensive project, there will be noticeable improvement.

AbhinavKulshreshtha
Автор

what if i want to parse 'a' as a number and add it to another vairable ?

let a = '10'
let b = 20

b += +a ?
b = b + +a ?

this is very confusing.

anikets
Автор

Be a team player. Write parseInt() instead, someone has to read your code one day

mixedmesh
Автор

This is just bad advice. You are sacrificing readability for a language hack.

gregbugaj