I have trouble understand the let declaration in javascript. When I assign the variable to something syntactical incorrect ( and give error), it still declare the variable. But I can not change value or access it. For example:
let test = abc; //reference error: abc not defined. Expected
let test = 5; //syntax error: test already "declare"
test = 5; //reference error: test not defined
alert(test); //reference error: test not defined
So even when the code occurs error, the variable is still declared and unchangeable?