From 51572a070cf04619ea2259c0e6365480e1779989 Mon Sep 17 00:00:00 2001 From: Nathan <59489624+cats256@users.noreply.github.com> Date: Thu, 6 Jul 2023 09:47:20 -0500 Subject: [PATCH] Update fibonacci-solution.js --- 10_fibonacci/solution/fibonacci-solution.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/10_fibonacci/solution/fibonacci-solution.js b/10_fibonacci/solution/fibonacci-solution.js index 1d7d9c6..acdd1e0 100644 --- a/10_fibonacci/solution/fibonacci-solution.js +++ b/10_fibonacci/solution/fibonacci-solution.js @@ -4,13 +4,11 @@ const fibonacci = function(count) { let firstPrev = 1; let secondPrev = 0; - - // For clarification: curr stands for current. This is standard syntax for (let i = 2; i <= count; i++) { - let curr = firstPrev + secondPrev; + let current = firstPrev + secondPrev; secondPrev = firstPrev; - firstPrev = curr; + firstPrev = current; } return firstPrev;