Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Is there a reason why making use of "globals" is discouraged in JS? - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
2mo ago
•
56 replies
Faker
Is there a reason why making use of "globals" is discouraged in JS?
🗣️
discussion
Hello
, I was reading a bit about
Number.parseInt()
Number.parseInt()
vs
parseInt()
parseInt()
. Then I encounted something like what
parseInt()
parseInt()
is a global function and
Number.parseInt()
Number.parseInt()
would be the preferred way to convert a string to a number
.
Can someone explain why pls
. Also
.
.
. why using global isn
't a good thing
?
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Next page
Similar Threads
When to make use of typescript, why make use of it over vanilla JS?
KP-C
Kevin Powell - Community / help
3mo ago
What is Redux and why is it important in JS?
KP-C
Kevin Powell - Community / help
8mo ago
is splice a modern method in js
KP-C
Kevin Powell - Community / help
11mo ago
Is there any disadvantage in using jsdoc for library authors?
KP-C
Kevin Powell - Community / help
9mo ago