Question 7
In Vue 2 (CDN), which of the following correctly describes the timing of the beforeDestroy and destroyed lifecycle hooks?
beforeDestroy runs after the component has been removed from the DOM, while destroyed runs before destruction.
beforeDestroy runs just before the component is torn down and removed from the DOM, while destroyed runs after the component is fully destroyed.
beforeDestroy runs when the component is first mounted, while destroyed runs before the component is removed.
both hooks run only after the component is destroyed.