Typescript Empty Array Length Javascript Method Syntax In Javascript