I think this is actually the best way to zero an array in place. The other option is using foo.splice(0,foo.length)
foo = []; Will reassign the reference but other pointers can still have the array.
foo.length=1 will remove all elements but the first.