What is the output for the following code?(function f(){ function f(){ return 1; } return f(); function f() { return 2; } })();Questions & Answers › Category: Programming Language › What is the output for the following code?(function f(){ function f(){ return 1; } return f(); function f() { return 2; } })(); 0 Vote Up Vote Down Adam asked 4 years ago What is the output for the following code?(function f(){ function f(){ return 1; } return f(); function f() { return 2; } })();a. 2b. NaNc. 1d. ErrorShare this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...1 Answers 1 Vote Up Vote Down Lokesh Kumar Staff answered 4 years ago a. 2Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...