⚠ Demo version — no backend. View the source on GitHub
Back

Sample Kata

Medium
:
01 Jun 20268 lines
recursion
math
demo

Kata

// Write a function that returns the nth Fibonacci number.
// Demo — no backend available.

function fibonacci(n) {
  if (n <= 1) return n;
  return fibonacci(n - 1) + fibonacci(n - 2);
}

Note

Scratch pad