ho w to display alert using javascript
Answers
Use alert function to display a popup message to the user. This popup will have OK button to close the popup.
The alert function can display message of any data type e.g. string, number, boolean etc. There is no need to convert a message to string type.
Sometimes you need to take the user's confirmation to proceed. For example, you want to take user's confirmation before saving updated data or deleting existing data. In this scenario, use JavaScript built-in function confirm(). The confirm() function displays a popup message to the user with two buttons, OK and Cancel. You can check which button the user has clicked and proceed accordingly.
The following example demonstrates how to display a confirm box and then checks which button the user has clicked.
Hope it helps ✌️
Answer:
Use alert() function to display a popup message to the user. This popup will have OK button to close the popup. The alert function can display message of any data type e.g. string, number, boolean etc. There is no need to convert a message to string type.
I hope you like it
Stay home and stay safe
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii please mark me as brainlist
Explanation: