Updated arrays to use .length property, a for-each style loop to display the output of a function that copies an array that is then sorted.