A variable declared with let can be redeclared in a different __________ but not in the same scope.

  • block
  • function
  • module
  • statement
The correct option is 'block'. In JavaScript, a variable declared with 'let' has block-level scope. This means it can be redeclared within a different block, such as within a different if statement or loop. However, attempting to redeclare it in the same block or scope will result in an error.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *