In the above example,
whatever we did to x in the function 'times2()' would effect the actual
variable we passed to the function. In this case we multiplied x by 2. We
passed var to times2(). So x becomes a reference to var when we called it. Now we make x equal itself
times 2. And since we passed var to the function it multiplies THAT by two. |