Skip to content

Commit bb3f237

Browse files
committed
assigning-to-input-param: rename inputValue to result
1 parent aa5a032 commit bb3f237

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/assigning-to-input-param/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function discount(originalInputValue, quantity) {
2-
let inputValue = originalInputValue;
3-
if (inputValue > 50) inputValue = inputValue - 2;
4-
if (quantity > 100) inputValue = inputValue - 1;
5-
return inputValue;
2+
let result = originalInputValue;
3+
if (result > 50) result = result - 2;
4+
if (quantity > 100) result = result - 1;
5+
return result;
66
}

0 commit comments

Comments
 (0)