I am trying to check if array is initialized in Swift. I am working on iOS Programming Big Nerd Ranch Guide, the code is in objective C and I am trying to write that in swift. I need a way to check if the array in initialized or not please check the below code:
var items1:[string]
var items2:[string]!
override init(){
super.init()
//how do i check if items1 or items2 is initialized
if(items1 == nil){ //this does not work
//Initialize the array and do something with it!!
}
}