You try to use append method but there is no built-in method and you didn't write it manually. If you want to get output like this [ 1,2,3,4,5,5,4,3,2,1 ] you can create a new array and then copy
elements from both arrays (initial array and returned from newArray method). And by the way while writing class name you should start capital letter (should be ArrayMirror not arrayMirror).
Welcome to the Ranch