Typescript Convert Number Array Example In Javascript