Correction: In the 3rd code snipplet, the "printNumTwo" is not a function its a variable

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function checkScope() {
var i = 'function scope';
if (true) {
  i = 'block scope';
  console.log('Block scope i is: ', i);
}
console.log('Function scope i is: ', i);
return i;
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 OPR/79.0.4143.73

Challenge: Compare Scopes of the var and let Keywords

Link to the challenge:

I’m not sure what you’re asking.

Technically, functions are just variables. All of the provided code snippits are legal. Did you try to run them?

1 Like

Oh sorry i didnt knew functions are like variables!

1 Like