Sometimes I want to redefine a globally-defined name, but use the global definition to determine the redefinition.
For example …
const width = Math.min(width, 600)
… for a chart that shouldn’t take up the full width on desktop but should on mobile.
Currently this throws an error:
ReferenceError: can't access lexical declaration `width' before initialization
It would be neat if I could instead do something like …
const width = Math.min(global.width, 600)
… or pick your favorite alternate name.