Tell us what’s happening:
Describe your issue in detail here.
why isn’t this working this should have passed the test!
Your code so far
let foods = {
apples: 25,
oranges: 32,
plums: 28,
bananas: 13,
grapes: 35,
strawberries: 27
};
function checkInventory(object, scannedItem) {
// Only change code below this line
let scannedfood = object[scannedItem];
return scannedfood
// Only change code above this line
}
console.log(checkInventory(foods, "apples"));
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Basic Data Structures - Access Property Names with Bracket Notation
Link to the challenge: