As I have learnt that we can not re-declare a const variable in JavaScript, but, in the console of Chrome, it allows us to redeclare whereas, in Firefox console or VS Code with Live Server extension in Chrome or Firefox shows the error. Why does re-declaring a const variable in Chrome console doesn't throw any Syntax Error?
Someone, please provide a good and clear explanation. Thank You.
Firefox console
Code in VS Code with Live Server in Firefox
Code in VS Code with Live Server in Chrome
I tried it in different consoles and in VS Code and I observed that only in the console of the chrome, if we redeclare a const variable, it doesn't throw any error.