Variable value not gets updated if function has same name as variable (JavaScript)

Viewed 24

I expected the answer to be "function text" as output, why the answer is 5?

var alpha = 5;
function alpha(){}
console.log(alpha);

0 Answers
Related