Skip to content

Commit af8852d

Browse files
authored
Change start to current
As start is semantically wrong... Its the `current` number!
1 parent bb9515e commit af8852d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

03_functions.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,14 @@ Here is a recursive solution:
617617
[source,javascript]
618618
----
619619
function findSolution(target) {
620-
function find(start, history) {
621-
if (start == target)
620+
function find(current, history) {
621+
if (current == target)
622622
return history;
623-
else if (start > target)
623+
else if (current > target)
624624
return null;
625625
else
626-
return find(start + 5, "(" + history + " + 5)") ||
627-
find(start * 3, "(" + history + " * 3)");
626+
return find(current + 5, "(" + history + " + 5)") ||
627+
find(current * 3, "(" + history + " * 3)");
628628
}
629629
return find(1, "1");
630630
}

0 commit comments

Comments
 (0)