I know that variable redeclaration leads us to syntax error and it is illegal but JavaScript has it's own weird concept about redeclaration. please I need guidance about this stuff.
1).I am trying to understand this when we use var variable in JavaScript it can be redeclared. 2).The last assigned value will get updated to var identifier. 3).I went through some resources, i got that v8engine is not redeclaring var it is just assigning the latest value to same var identifier, ok up to know this is perfect. 4).If it so why the same flexibility of redeclaring not given to let and const keywords in JavaScript. 5).What is happening behind this complex stuff please explain me