This method changes the original array. It is not a pure function. Note: When an array grows too large, JavaScript must allocate a bigger memory block and copy everything over. This costs performance.