What is the output for the following code

(function f(){

function f(){

return 1; }

return f();

function f()

{ return 2; } })();

a) NaN

b) 1

c) 2

d) Error

(function f(){

function f(){

return 1; }

return f();

function f()

{ return 2; } })();

a) NaN

b) 1

c) 2

d) Error