It results undefined because you have initialized the variable 'x' already but haven't defined the variable with any value. This is why it prints out undefined.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
First things first, thank you Lydia for this amazing topic. and I've a question regarding using let.
I think let variables is initialized to with undefined. but due to being in temporal zone it's value is inaccessible.
I tried
let x;
console.log(x); // resulting >> undefind
Yes this is true... The value will be accessible only after the temp dead zone expires...
It results undefined because you have initialized the variable 'x' already but haven't defined the variable with any value. This is why it prints out undefined.