for 문으로 풀어보았당
function getFibo(n) { if (n <= 1) return n; let sum = 0, last = 1, realLast = 0; for (let i = 1; i < n; i++) { sum = realLast + last; realLast = last; last = sum; } return sum; }