C
ELESTRIA
Export
C
u
s
t
o
m
i
z
e
Code
function fibonacci(n: number): number { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); } // Calculate the first 10 numbers in the sequence const sequence = []; for (let i = 0; i < 10; i++) { sequence.push(fibonacci(i)); } console.log(sequence); // [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
Language
Theme
Background
Font Family
Font Size
Padding
Show line numbers
Show window controls
Reset settings