Answer & Solution
Answer: Option Option D
Solution:
The purpose of window.alert() in JavaScript is to display a dialog box with a message and an OK button to the user. This dialog box is modal, meaning it halts the execution of the script until the user interacts with it by clicking the OK button. It is commonly used for displaying information, warnings, or notifications to users on web pages.