Take this code, in which we declare and populate a small array:
var lines = ;
That works fine, but if you try to pass the lines array to another function, it will make a copy of the array rather than allowing the other function to edit the original array directly. You can set up this other function to return a different array and re-set the original array, but there are times when it would be much easier if you just pass a reference to the original array rather than make a copy of it.
In C, these are called pointers. I don’t know what they’re called in other languages because I haven’t done them in other languages.
var lines = Object();
All we’ve changed is that first line, but the variable will now be passed to other functions as a reference to the original array. The variable is invisible outside of the original function and any functions we pass it to.