Added the Price Sorting.

This commit is contained in:
Batuhan Berk Başoğlu 2021-02-04 20:06:16 -05:00
parent d3b5d7c969
commit bed0e13ceb

View file

@ -75,6 +75,9 @@ var products = [
}
];
products.sort(function(a, b) {
return a.price - b.price;
})
// given restrictions provided, make a reduced list of products
@ -122,5 +125,5 @@ function getItemPrice(chosenProduct){
return products[i].price;
}
}
}