MCQs > IT & Programming > JavaScript > What's the output? var x=1; function f(x) { if (x === 0) { return 1; } return x * f(x-1)+2; } console.log(f(8));

JavaScript MCQs

What will be the correct output of the following JavaScript code?
var x=1;
function f(x)
{

  if (x === 0)
{
    return 1;
}
  return x * f(x-1)+2;

}
console.log(f(8));




Answer

Correct Answer: 178882

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it