JavaScript Input/Output

Objectives

JavaScript I/O

Dialog demonstration code

var nm = prompt("Enter your name"); var ok = false; if (nm) ok = confirm("I'm going to use " + nm + " as your name."); if (ok) alert("Nice working with you, " + nm); else alert("Then I'll just call you Pinhead.");