Alert in javascript

What you will learn here about javascript

  • alert in javascript

alert or pop up in javascript is display by using alert() method or function. alert method is the method of windows object. window object is global object. so we can access alert() method by two ways

  1. window.alert() //using window object
  2. alert() //without window object

Example of window.alert()

window.alert(“This is example of window.alert”);

Example of alert()

alert(“This is example of alert”);

You may also like...