mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 21:49:51 +01:00
20 lines
354 B
Plaintext
20 lines
354 B
Plaintext
let fibonacci := (number) -> {
|
|
if (number < 2) {
|
|
return number;
|
|
} else {
|
|
return fibonacci(number - 1) + fibonacci(number - 2);
|
|
}
|
|
}
|
|
|
|
print(fibonacci(6))
|
|
|
|
fun hogonacci(number) {
|
|
if (number < 2) {
|
|
return number;
|
|
} else {
|
|
return hogonacci(number - 1) + hogonacci(number - 2);
|
|
}
|
|
}
|
|
|
|
print(hogonacci(6))
|