Tell us what’s happening:
in destructuring the order is important,
so the order of object creation should be the same of the order of destructuring
but in the objective, the order is different.
Your code so far
products.forEach(
({id,name,price,category}) => {}
);
doesn’t equal a correct code
but
products.forEach(
({name,id,price,category}) => {}
);
is a correct code for this step…
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic OOP by Building a Shopping Cart - Step 9