Get all but last element in TypeScript

A small article about removing last element in TypeScript, mostly a matter of read-ability