University of Sydney_INFO1003_Foundamental of IT_2012 Semester 2
26/08/2012
Exercise: Input/Output Q4. What is the output of the following program:(say e= 3 and f= 5)
<script>var e= prompt(“Enter value e:”); e--; var f= prompt(“Enter value f:”); f++; e= e+ f; alert(“e is“+e);</script>
21
Comments<html><head><title>Variables</title> title Variables/title<script> var name=prompt("Please
input your name");// Input from User alert(name+" is the name!");// Output to popup window</script></head><body> body<script> document.write(name);/* Output to Screen */</script></body></html>22