Firefox Developer's edition; cannot clear console of javascript data one entered. Must quit application. https://stackoverflow.com/questions/41752998/how-can-i-clear-the-console-javascript-in-firefox
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
People
(Reporter: redmoonproject, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:67.0) Gecko/20100101 Firefox/67.0
Steps to reproduce:
When writing code in the console, it will not forget declared variables when cleared
let a = 5; for example. One cannot then let a = "hello world";
To clear console data one must quite application and restart.
Actual results:
syntax error
Expected results:
new declared value for the variable. (javascript)
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Hello redmoonproject, thanks for filing an issue.
Though, I think it's not a valid bug.
If you write the following in a script:
let a = 5;
let a = "hello world";
You'll get a similar error that the one you describe, because it's how javascript works.
If you want to be able to redeclare variable, you can use var, or you can create an execution block around your expression so the let variables is not bound to the "global" scope:
{
let a = 5;
}
Description
•