Answer would be Option 3
because the variable author
is declared inside the code-block created by the if
statement. Accessing the variable outside its scope would throw a ReferenceError
.
To know more about Scoping, checkout --
Answer would be Option 3
because the variable author
is declared inside the code-block created by the if
statement. Accessing the variable outside its scope would throw a ReferenceError
.
To know more about Scoping, checkout --