String Array Functions In Typescript Vs Node