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 unload event triggers when the document is being unloaded. This occurs under all specified scenarios: closing the browser or tab, reloading the current page, or navigating to a different URL. Thus, 'All Of the Above' is correct.