Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b245bd

Browse filesBrowse files
author
sunjieming
committed
Update description
1 parent 665adb3 commit 3b245bd
Copy full SHA for 3b245bd

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎src/project-3.js‎

Copy file name to clipboardExpand all lines: src/project-3.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@ const sumUserPostLikes = (user) => {
7878
};
7979

8080
const addCalculateDiscountPriceMethod = (storeItem) => {
81-
// add a method to the storeItem object called 'calculateDiscountPrice'
82-
// this method should multiply the storeItem's 'price' and 'discountPercentage' to get the discount
83-
// the method then subtracts the discount from the price and returns the discounted price
81+
// Add a method to the storeItem object called 'calculateDiscountPrice'
82+
// This method should multiply the storeItem's 'price' and 'discountPercentage' to get the discount
83+
// The method then subtracts the discount from the price and returns the discounted price
8484
// example:
8585
// price -> 20
8686
// discountPercentage -> .2
8787
// discountPrice = 20 - (20 * .2)
88+
// Make sure you return storeItem after adding the method to it
89+
// hint: arrow functions don't bind a this
8890
};
8991

9092
// Do not modify code below this line.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.