Tell us what’s happening:
i can’t see what is wrong with my code
i’m still not passed
Your code so far
let foods = {
apples: 25,
oranges: 32,
plums: 28,
bananas: 13,
grapes: 35,
strawberries: 27
};
function checkInventory(scannedItem) {
// Only change code below this line
return foods[scannedItem];
// Only change code above this line
}
console.log(checkInventory("apples"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Challenge: Basic Data Structures - Access Property Names with Bracket Notation
Link to the challenge: