Consider following code snippet:
<!DOCTYPE html>
<html>
<body>
<script>
console.log(name); //should generate some error but output is blank line
function show() {
var name = "Victor";
}
</script>
</body>
</html>
name
will be hoisted to the top of function but I am printing it in global scope. So why its output is blank line- no error nothing?