Back
Back to Lab
More Information
Debug
function fib(n) { const seq = [0, 1]; while (seq.length < n) { const len = seq.length; seq.push( seq[len - 1] + seq[len - 2] ); } return seq.slice(0, n); }
Source Code