dimanche 7 février 2016

Exclamation mark prefix on variables during if statements and other as well?

I'm very confused even after looking through similar questions of what the(!) operator does when it is prefixed on a variable or other object in if statements, functions, etc?

Example:  

mutating func add(value: T) 
   {  
        if !contains(items, value)
          {
          items.append(value)  
          }
   }

Aucun commentaire:

Enregistrer un commentaire