function Add(){ console.log(answer) var answer = 2 }; Add()
What will be the output of the following code?
2
4
undefined
Error
Correct Answer : C
var temp= 'hi'; function display(){ console.log(temp); var temp = 'bye'; }; display();
What will be the output of the code?