Can you use const within a for...of loop to declare a variable for each iteration?

  • Yes
  • No
  • It depends
  • Not applicable
In a for...of loop, the variable declared using const cannot be reassigned in each iteration. The loop variable retains its value throughout the loop, making it unsuitable for situations where reassignment is needed for each iteration.
Add your answer
Loading...

Leave a comment

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