Typescript Empty Array Length Javascript Method Syntax In Java