`const` works that way in most of the C family that uses it as a keyword or is restricted only to "primitive" types. To be fair, I agree that JS isn't really a C-style language under the hood and as a functional programming enthusiast I wish `const` was called `let` and `let` called something like `mut` or `let mut`, but JS likes its pretend-to-be-C-family surface level so I'm not upset about it.
`import` works great in the REPL, the various REPLs I use have caught up. Most of them in REPL mode let you redeclare imports and reimport modules as needed. They also all support top-level await so it's just as easy to use `let { thing } = await import('some-module.js')` if you want more of a safety net to redeclare as you wish.
`import` works great in the REPL, the various REPLs I use have caught up. Most of them in REPL mode let you redeclare imports and reimport modules as needed. They also all support top-level await so it's just as easy to use `let { thing } = await import('some-module.js')` if you want more of a safety net to redeclare as you wish.