What is the difference between if(!variable) and if(variable != nil) iphone -


what difference between

if(!variable)    

and

if(variable != nil)     

as noted have logic bit backwards, outside of work same.

the main thing consider ( variable != nil ) bit more clear checking , type variable is, since may start thinking variable boolean.


Comments