JavaScript Prompt() Method

JavaScript Prompt() Method

Prompt() method is used to get inputs from user.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <script id="javascript">
    var value=prompt("what is your age?","");
    alert(value);
    </script>
</body>
</html>

image.png