Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let foods = {
- apples: 25,
- oranges: 32,
- plums: 28,
- bananas: 13,
- grapes: 35,
- strawberries: 27
- };
- function checkInventory(scannedItem) {
- return foods[scannedItem]
- }
- console.log(checkInventory("apples"));
Add Comment
Please, Sign In to add comment