I'm currently playing around with "const" variable in javascript and here is my code
My question is, why is "const x" undefined when used with "console.log", but it is defined when used on its own?
p.s. -- I understand that both global "const, let" do not become the property of "window" object, unlike global "var". But I am unsure as to whether this played any role in the code above.