Why JS interpreter throws an error?

Here is the code:
const a = 1;
console.log(a);
a = 2;
console.log(a);
March 23rd 20 at 18:48
1 answer
March 23rd 20 at 18:50
Solution
By the fact that a is constant
Thank you! - Jan_Fah commented on March 23rd 20 at 18:53

Find more questions by tags JavaScript