From 8ee786a5984427b1908d24cdf449ee007a7b0dd5 Mon Sep 17 00:00:00 2001 From: edumoreira1506 Date: Mon, 26 Aug 2019 09:12:16 -0300 Subject: [PATCH] Fixing the spaces identation --- src/algorithms/math/tribonacci/tribonacci.js | 20 +++++++++---------- .../math/tribonacci/tribonacciNth.js | 14 ++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/algorithms/math/tribonacci/tribonacci.js b/src/algorithms/math/tribonacci/tribonacci.js index d35481c0..b57a1aab 100644 --- a/src/algorithms/math/tribonacci/tribonacci.js +++ b/src/algorithms/math/tribonacci/tribonacci.js @@ -5,18 +5,18 @@ * @return {number[]} */ export default function tribonacci(n) { - const tribSequence = [0]; - let currentValue = 1; + const tribSequence = [0]; + let currentValue = 1; - if(n >= 2) { - tribSequence.push(currentValue); - } + if(n >= 2) { + tribSequence.push(currentValue); + } - for (let i = 2; i < n; i++) { - tribSequence.push(currentValue); - currentValue += tribSequence[i - 1] + tribSequence[i - 2]; - } + for (let i = 2; i < n; i++) { + tribSequence.push(currentValue); + currentValue += tribSequence[i - 1] + tribSequence[i - 2]; + } - return tribSequence; + return tribSequence; } \ No newline at end of file diff --git a/src/algorithms/math/tribonacci/tribonacciNth.js b/src/algorithms/math/tribonacci/tribonacciNth.js index efeb5847..74af2af6 100644 --- a/src/algorithms/math/tribonacci/tribonacciNth.js +++ b/src/algorithms/math/tribonacci/tribonacciNth.js @@ -5,14 +5,14 @@ * @return {number} */ export default function tribonacciNth(n) { - const tribSequence = [0, 0, 1]; - let currentValue = 1; + const tribSequence = [0, 0, 1]; + let currentValue = 1; - for (let i = 3; i <= n; i++) { - tribSequence.push(currentValue); - currentValue += tribSequence[i - 1] + tribSequence[i - 2]; - } + for (let i = 3; i <= n; i++) { + tribSequence.push(currentValue); + currentValue += tribSequence[i - 1] + tribSequence[i - 2]; + } - return tribSequence[n]; + return tribSequence[n]; } \ No newline at end of file