Redeclaration of const, let and class statements

Does the Console supports redeclaration of const statement, in addition to the existing let and class redeclarations? The inability to redeclare is an annoyance for me when using the Console to experiment with new JavaScript code.

1 Like

Hi,

This is not available at the moment, but a bug was filed for this at https://bugzilla.mozilla.org/show_bug.cgi?id=1580891

As mentioned in a comment there, if you use the multiline version, a workaround is to wrap your snippet in curly brackets, but it’s not exactly the same as allowing re-declaration of let/const.