To get the length of an array, use the count property:
var OSes :[String] = ["iOS", "Android", "Windows"] var lengthofArray = OSes.count
To check whether an array is empty, use the isEmpty() function:
var OSes :[String] = ["iOS", "Android", "Windows"] var arrayIsEmpty = OSes.isEmpty print(arrayIsEmpty)