DEV Community

Discussion on: JavaScript: Introduction to Scope (function scope, block scope)

Collapse
 
devhamzaa profile image
Dev Hamza

you are storing the array[index] in element
you are not re-declaring but you are updating the value of element