JavavScript Puzzle

#kishoreTVK

today a simple puzzle from javascript.

<!DOCTYPE html>
<html>
<body>

<p>Click the button to demonstrate the prompt box.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var person = prompt("Please Enter your flight id!", "Harry Potter");
    if (person != null) {
        document.getElementById("demo").innerHTML =
        "Hello " + person + "! Thanks for boarding our service";
    }
else
{
alert("Invalid name");
}
}
</script>

</body>
</html>


thus my journey starts 

the bug is simple one. 

Comments

Popular posts from this blog

terms and conditions

Hello Angular