Computer Science, asked by patnampriyankareddy, 3 months ago


What is the Output of the below snippet?
var foo = function foo() {
console.log(foo === foo);
foo();​

Answers

Answered by Oreki
5

\text{\large\bf Given Snippet}

   \texttt{var foo = function foo() \{}\\\texttt{\hspace{6em} console.log(foo === foo);}\\\texttt{\hspace{4.5em} \}}\\\texttt{foo();}

\text{\large\bf \symbol{79}utput}

   \texttt{true}\\\textsf{\: \: \: \: As, the function \texttt{foo} is being compared with itself.}

Similar questions