how to check if list array is empty typescript code example Example: check if array is empty javascript array.length = []