Is there any feature in Chrome > DevTools > console which clears / resets / removes variables and functions declared while testing through it (just like calling clear, clears the logs)?
Let's say, for an example, I have a variable declared with let keyoword..
let str = "Hello";
..and I run it through console once and I re run the same code through console again.
Yeah, It would throw an error "Identifier 'str' has already been declared" as expected because the variable has already been declared and it can't be declared again (unlike declaring it with var keyword) so to re run the code through console, I have to refresh the page which resets the context of the frame / target.
Is there any other option?