{ var r=confirm("Do you want to go for a drink?") if(r==true) { document.write("Great!") } else { document.write("Never mind.") } }