typescript check if array is null or empty code example Example: check if array is empty javascript array.length = []