متد .not() و ! در کاتلین⌨️
🔤 اکثر اوقات از ()not. استفاده میکنیم چون خواناتر از ! هستش. ولی یک نکته مهم دیگه ای هم هست که not نمیتونه انجام بده:
#kotlin
☕️ @CodeExplore
myEvents?.forEach { myEvent ->
if (!myEvent.events.isNullOrEmpty()) {
myEvent.events.find { it.type == eventType }
}
if (myEvent.events.isNullOrEmpty().not()) {
myEvent.events.find { it.type == eventType }
}
}#kotlin
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥11❤🔥2⚡2