in Technology by

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

1 Answer

0 votes
by
Answer:-2




#javascript #carinsurance #health-insurance #medical-insurance

Related questions

0 votes
    What is the output for the following code (function f(){ function f(){ return 1; } return f(); function f() { return 2; } })(); 1. NaN 2. 1 3. 2 4. Error...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    Predict the output of the following code snippet function foo(input: boolean) { let one = 1200; if (input) { let ans ... 1. 1201 2. Undefined 3. Compilation error 4. Runtime error...
asked Jun 29, 2021 in Technology by JackTerrance
0 votes
    What is the output you get for the following code? (function() { return typeof arguments; }) (); 1. arguments 2. array 3. object 4. undefined...
asked Feb 26, 2021 in Technology by JackTerrance
0 votes
    What is the output you get for the following code? (function() { return typeof arguments; }) (); 1. undefined 2. array 3. arguments 4. object...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    What is the output you get for the following code? (function() { return typeof arguments; }) (); A) undefined B) array C) arguments D) object...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
    What is the output for the following function test(x) { while(x < 5) { x++; } return x; } alert(test(2)); 1. 6 2. 3 3. 2 4. 5...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    What is the output for the following function test(x) { while(x < 5) { x++; } return x; } alert(test(2)); A) 6 B) 3 C) 2 D) 5 #insurance and Loans...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
    What will be the output of the following Python code snippet? for i in [1, 2, 3, 4][::-1]: print (i) a) 4 3 2 1 b) error c) 1 2 3 4 d) none of the mentioned...
asked Jan 2 in Technology by JackTerrance
0 votes
    FIbonacci Series Program function fibonacciSequence(input) { var a=0;b=1;c=0; var array1=[0,1]; for(var i=2;i<= ... array1; } 1 .Above code is Correct 2. Above code is incorrect...
asked Feb 24, 2021 in Technology by JackTerrance
0 votes
    FIbonacci Series Program function fibonacciSequence(input) { var a=0;b=1;c=0; var array1=[0,1]; for(var i=2;i<= ... [endif]--> a) True b) False Read Loans and Insurance questions...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
    For the function F (s) = (s^2+s+1)/s(s+5)(s+3), after splitting this function into partial fractions ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 16, 2021 in Education by JackTerrance
...