I am confused about how const is used in javascript.
for (let stat of allStats){
const index = allStats.indexOf(stat);
console.log(filenames[index], stat.isFile());
}
For example in the above code, "const index" within the for loop is being assigned different values in each iteration. How is that possible. I mean once a value is assigned to a const variable, can it be changed?
What have I misunderstood here..?