1) There is no problem using const inside for..in or for..of loops.
On the contrary it adds a level of security if you don't want to reassign the value of the variables inside of the loop.
Do you have some sources of "you're telling the scripting engine not to release the variables when done.", I'll be happy to read it.
2) Indeed I know destructuring and that funky syntax, but you need to use a for...of loop with the Array returned by Object.entries, else you won't have what you are trying to accomplish.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sigh, how I love that Stack overflow tone :).
1) There is no problem using const inside for..in or for..of loops.
On the contrary it adds a level of security if you don't want to reassign the value of the variables inside of the loop.
Do you have some sources of "you're telling the scripting engine not to release the variables when done.", I'll be happy to read it.
2) Indeed I know destructuring and that funky syntax, but you need to use a for...of loop with the Array returned by Object.entries, else you won't have what you are trying to accomplish.