Chrome DevTools: Redeclare let and class statements in the Console Panel
Last updated: 20th July 2020You can now redclare let
and class
statements in the Console Panel for easier prototyping and experimenting of JavaScript code.
Previously, if you entered the following in the DevTools Console Panel:
let variable = 1
// Press Enter ⏎
let variable = 2
// Press Enter ⏎
You would see an error message: Uncaught SyntaxError: Identifier 'variable' has already been declared
.
DevTools now supports this redeclaration for both let
and class
statements.