Question: What is the mistake in the second alert statement in the code? function func 1 ( n ) { if ( n = = 0

What is the mistake in the second alert statement in the code?
function func1(n)
{
if (n==0)
return 0;
else
return (n+func1(n-1);
}
function func2(n, result)
{
if (n==0)
return result;
else
return (n+func2(n-1, n+result));
}
alert ("output of func2(4,0) is "+ func2(4,0));
alert ("output of func1 is "+ func1(4,0)) ;
 What is the mistake in the second alert statement in the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!