1. Warning box alert()
alert("Welcome !");
2. Information box confirm(), with cancel and OK buttons
if (confirm("Do you agree?")) {
alert("Agree");
} else {
alert("No Agree");
}
3. Prompt box prompt(), used to prompt the user to enter some text
var result = prompt("What is your surname?"," ");
if (result !== null) {
alert(“Welcome,” result);
}