DEV Community

Discussion on: Differences between Node.js and the Browser

Collapse
lukeshiru profile image
LUKESHIRU

globalThis is generally better than using window or global, because is an alias for both. I mean, generally you don't want to mess with the global, but if you have to, better use globalThis.

Collapse
cleancodestudio profile image
Clean Code Studio Author

Awesome tip Luke! Thanks for sharing the knowledge 🙏