Yes, though it's probably more correct to think of it as array is assigned the 'value' [3,1,2], rather than overwritten, since the variable 'array' is actually the same object after the sort!