We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
inputValue
result
1 parent aa5a032 commit bb3f237Copy full SHA for bb3f237
src/assigning-to-input-param/index.js
@@ -1,6 +1,6 @@
1
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;
+ let result = originalInputValue;
+ if (result > 50) result = result - 2;
+ if (quantity > 100) result = result - 1;
+ return result;
6
}
0 commit comments