Great explainer on realms! Often used but never well named. I remember first reading about realms when going thru top level await spec proposals and being way in over my head 😅

What is a realm in JavaScript? · Gal Weizman
weizman.github.io/page-what-is

Oh! And it's got a great explanation for why you can't always consistently use const or let when paused in the debugger and step forward, because they operate on the declarative environment of the global scope but var exists in the object environment just like window. I never really knew why they were out of scope but now apparently I have my answer!

Show thread
Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml