We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d253ac commit 962abd0Copy full SHA for 962abd0
src/project-3.js
@@ -124,9 +124,14 @@ const addCalculateDiscountPriceMethod = (storeItem) => {
124
// discountPrice = 20 - (20 * .2)
125
// Make sure you return storeItem after adding the method to it
126
// hint: arrow functions don't bind a this
127
+
128
storeItem.calculateDiscountPrice = function calculateDiscountPrice() {
129
return this.price - (this.price * this.discountPercentage);
130
};
131
132
+ // storeItem.calculateDiscountPrice = () => {
133
+ // return storeItem.price - (storeItem.price * storeItem.discountPercentage);
134
+ // };
135
return storeItem;
136
137
0 commit comments