Javascript - What is the output: const variables declarations in for loops?

Question

What is the output of the following code?

for (const i=0; i<3; i++) { 
    console.log(i); 
} 


Click to view the answer

TypeError: Assignment to constant variable (due to i++)

Note

In the case of const, the initial assigned value to a const variable will not change again.