mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-26 23:21:18 +08:00
Code style fixes.
This commit is contained in:
parent
19f4cc70d3
commit
d154015cda
@ -18,7 +18,7 @@ export default function fibonacci(n) {
|
|||||||
|
|
||||||
while (iterationsCounter) {
|
while (iterationsCounter) {
|
||||||
currentValue += previousValue;
|
currentValue += previousValue;
|
||||||
previousValue = (currentValue - previousValue);
|
previousValue = currentValue - previousValue;
|
||||||
|
|
||||||
fibSequence.push(currentValue);
|
fibSequence.push(currentValue);
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ export default function fibonacciNth(n) {
|
|||||||
|
|
||||||
while (iterationsCounter) {
|
while (iterationsCounter) {
|
||||||
currentValue += previousValue;
|
currentValue += previousValue;
|
||||||
previousValue = (currentValue - previousValue);
|
previousValue = currentValue - previousValue;
|
||||||
|
|
||||||
iterationsCounter -= 1;
|
iterationsCounter -= 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user