Popup Boxes Application

Following is the javascript code which contains the application of all the three types of javascript popup boxes :-

let choice = confirm("Do you want to vote?");
if(choice)
{
    let age = prompt("Enter your age");
    if(age<18)
    {
        alert("You are not eligible");
    }
    else
    {
        alert("You are eligible");
    }
}

For the revision of the Popup Boxes you can refer to this post and drop your doubts and queries.

Happy Learning,
Shivendra Tripathi (@shivendra1751 )
TA

1 Like