Series: Genuary 2026

All posts

Recent posts

Genuary 2026.03: Fibonacci forever

3) Fibonacci forever

Fibonacci

This is entirely based around this Fibonacci generator function:

function makeFibber(maxValue = 1000) {
  let a = 1;
  let b = 1;
  return () => {
    let n = a + b;
    a = b;
    b = n;
    if (b > maxValue) {
      a = 1;
      b = 1;
    }
    return a;
  };
}

Make a fibber and then just keep calling it for next values.

All sorts of exciting options here!

read more...