(V8 developer here.)
console.log(z) is not an example of an early error.)
It gives reference error as z is not defined without logging to the console (No Error) first why this is happening
That is not what’s happening; “First No Error” is logged before the ReferenceError is thrown. Try it and see!
I want to know what is known inside the function and one can use it before the function itself is executed.
Objects are created and variables are initialized when the respective code runs. When you define a function, you can refer to any variables in the function’s outer (lexical) scope. For example:
CLICK HERE to find out more related problems solutions.