alert, prompt and confirm in JavaScript

 alert("Enter the value of a");

let a = prompt("Enter value of a : ", "522");
a = Number.parseInt(a);
//document.write("The value of a is : " + a);
alert("You entered a of type " + (typeof a));
let write = confirm("Do you want to write it to the page ?");
if (write) {
    document.write("You entered : " + a);
}
else {
    document.write("Please allow me to write");
}







Comments

Popular posts from this blog

Symbols tutorial in Advance JavaScript

Async and Await Method tutorial in Advance JavaScript

String Methods in JavaScript