export function fibonacci(value) {
let previous0 = 0, previous1 = 1;
let nextValue = 0;
if (value === 0) {
nextValue = 0;
} else if (value === 1) {
nextValue = 1;
}
for (let i = 2; i <= value; i++) {
nextValue = previous0 + previous1;
previous0 = previous1;
previous1 = nextValue;
return nextValue;