Exception: SyntaxError: redeclaration of let foods

I am using a scratch pad to test a code on fire fox. Once the let variable is declared and you want to run the same code again for retesting, the exception error gets executed. i have to refresh the page and close the scratch pad and then restart the scratch pad for re-execution. is there a way around not to do all those steps and to just rerun the code?

I usually wrap code in the scratchpad with a pair of braces.

{
  let x = 2
  // ...
}

That way the variable is block-scoped between the braces, and discarded at the end. No more refreshes!