I am learning JavaScript and have been doing a lot of testing in the Chrome console. Even if I clear the console, or use any of the commands I\'ve seen in other threads (
If you want to remove that variable then
delete name;
There is actually an answer to this, not sure if this is new or has been here for a while but if you perform a hard refresh i.e. control + shift + r then the console values are completely removed and you can re-instantiate the same variables and functions, etc.
I think the best way to clear the defined varible would be:
window.location.reload();
It would automatically remove all the declared variable at once.