Mark As Completed Discussion

Let's test your knowledge. Click the correct answer from the options.

#1 - Variable Hoisting

What will be the output of this code?

JAVASCRIPT
1console.log('name is ', name);
2 
3var name;
4 
5console.log('name is ', name);
6 
7name = "Susan";
8 
9console.log('name is ', name);

Click the option that best answers the question.

  • Null Undefined Susan
  • Undefined Undefined Susan
  • Null Null Susan