Skip to content

Commit c2a062e

Browse files
committed
edited after feedback
1 parent 58000c1 commit c2a062e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Sprint-1/destructuring/exercise-3/exercise.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ function printReceipt(order) {
1414

1515
for (let i = 0; i < order.length; i++) {
1616
const item = order[i];
17-
const itemName = item.itemName;
18-
const quantity = item.quantity;
19-
const unitPricePence = item.unitPricePence;
17+
const { itemName, quantity, unitPricePence } = item;
2018

2119
const itemTotal = quantity * unitPricePence;
2220
total += itemTotal;

0 commit comments

Comments
 (0)