University of Sydney_INFO1003_Foundamental of IT_2012 Semester 2
26/08/2012
Changing Variable Values The value of the variable can be changed at any time.
<script> var i= 10; var j= 15;… after some codes… i= 50; j= i+5;</script>
i 10 50 j 15 5515
Variable (Tracing) ExerciseQ1. What happens in the following code:<script> var x= 10;; var y=“INFO1003”; var z= 30; x= x+ z; a= x+ y; z= x+ z;</script> What is x x, y y, z and a?
16