Question: How do you destructure the properties that are sent to the Dish component?

  1. `function Dish([name, cookingTime]) { return

    {name} {cookingTime}

    ; }`
  2. `function Dish({name, cookingTime}) { return

    {name} {cookingTime}

    ; }`
  3. `function Dish(props) { return

    {name} {cookingTime}

    ; }`
  4. `function Dish(...props) { return

    {name} {cookingTime}

    ; }`

Answer: The correct answer of the above question is Option B:`function Dish({name, cookingTime}) { return

{name} {cookingTime}

; }`