Assuming object
is a kind of NSObject
, the following if statements are equivalent, but which style should I use?
if (object) {
// ...
}
or
if (object != nil) {
// ...
}
As you say, they're equivalent. Thus...
which style should I use?
Whichever one you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With