Generation

typingsSun, 13 Nov 2022

function factorial(n){ if (n === 0) { return 1 } return n * factorial(n-1); }

function factorial(n: number): number { if (n === 0) { return 1 } return n * factorial(n-1); }

Questions about programming?Chat with your personal AI assistant