Question: Can any one tell me what this code is producing? const items = [ { name: 'Bike', price: 100 }, { name: 'TV', price: 200
Can any one tell me what this code is producing?
const items = [ { name: 'Bike', price: 100 }, { name: 'TV', price: 200 }, { name: 'Album', price: 10 }, { name: 'Book', price: 5 }, { name: 'Phone', price: 2000 }, { name: 'Keyboard', price: 50 }, { name: 'Mouse', price: 500 }, { name: 'Computer', price: 30 }, ] const foundItem = Boolean(items.length) && items.filter(item => item.price === 10) console.log(foundItem)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
