Flowchart (ISO 5807)
Source code
TypeScript
function factorial(n: number): number {
if (n <= 1) return 1;
return n * factorial(n - 1);
}The editor opens with this code — change it and the chart redraws.
- Language
- TypeScript
- Constructs
- recursion
- Topic
- Recursion
- Formats
- Word, Visio, draw.io, PDF, SVG