Typescript Tutorials: Funtions on array