Multiple choice technology programming languages

onUnload event of Javascript is fired in which of the following conditions

  1. When browser is closed

  2. When the page reloads as well.

  3. Only when you navigate out of the page.

  4. All Of the Above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The onUnload event fires when a document is unloaded from the browser window. This occurs in three scenarios: when the browser window closes, when the page reloads (including refresh), and when the user navigates away from the page (clicking links, back/forward buttons). Therefore, all listed conditions are correct.