Typescript, Generics, Polymorphism.
name, we can use here <S>, <U>, <A> or <ArrayElement> if we want, but the most popular, in my experience, are <T>, <S> and <U>. Here we reverse and return the array containing the same elements as the argument array, so the type consistency is preserved. You might ask, what is the scope of this