Free Puzzle Questions with Answer using Java, C#, JavaScript and PHP

JavaScript - Manage Dialog

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">

    <script language="JavaScript" type="text/javascript">
        function ShowAlertDialog(){
            alert("Simple notification message");

        function ShowConfirmDialog(){
            var result = confirm("Are you 18 and above years old?");
            if(result == true){
                alert("You are old enough to have a beer");
                alert("Sorry, not old enough");

        function ShowPromptDialog(){
            var fullname = prompt("Please enter your name here:", "Your Name Here");

            alert("Your name is " + fullname);
    <button onclick="ShowAlertDialog()">Show Alert Dialog</button>
    <button onclick="ShowConfirmDialog()"> Show Confirm Dialog</button>
    <button onclick="ShowPromptDialog()"> Show Prompt Dialog</button>