7 lines
185 B
JavaScript
7 lines
185 B
JavaScript
export function fibonacci(value) {
|
|
// implementar logica aqui
|
|
let phi = (1 + Math.sqrt(5))/2;
|
|
let asymp = Math.pow(phi, value) / Math.sqrt(5);
|
|
|
|
return Math.round(asymp);
|
|
} |