Outline

Here is a possible solution to this exercise:

// slice and splice

const pizzas = [
  { name: 'Pepperoni', price: 8 },
  { name: 'BBQ Chicken', price: 12 },
  { name: 'Hawaiian', price: 10 },
  { name: 'Meat Lovers', price: 12 },
];

// 1. Create a new array of pizzas from the first two pizzas in the array
const firstTwo = pizzas.slice(0, 2);
console.log(firstTwo);

// 2. Remove your least favorite pizza from the array
pizzas.splice(3, 1);
console.log(pizzas);

You can view this solution here on StackBlitz.

 

I finished! On to the next chapter