GeneralCore

test

JavaScript Solution & Complexity Analysis

Run & test in browser
JavaScript Lab Sandbox
let n = 5;

function printName(n) {
  if (n == 0) {
    return;
  }
  console.log("Recursion");
  return printName(n - 1);
};

printName(n);
Console Output
Click "Run Code" above to execute and view output...