Javascript | JavaScript Operators | Question 3

Last Updated :
Discuss
Comments


console.log(foo());

var foo = function()

{ return "Function Expression"; };

function foo()

{ return "Function Declaration"; } 

What will be Logged to the console?

"Function Expression"

"Function Declaration"

Type Error

ReferenceError

Share your thoughts in the comments