Tell us what’s happening:
I have just known that if you override a variable with let keyword, it throws.
But why it is happening in case 1 only, why not happening in case 2 too.
Your code so far
//case 1
let x = 4;
x= 6;
//case 2
let y = 5;
let y = 7;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
.
Challenge: Explore Differences Between the var and let Keywords
Link to the challenge: