DEV Community

Discussion on: Differences between Node.js and the Browser

lukeshiru profile image

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.

cleancodestudio profile image
Clean Code Studio Author

Awesome tip Luke! Thanks for sharing the knowledge 🙏