Reputation: 621
In Java we do use !
in case we want to say NOT. But what should I use in Kotlin if I follow some range condition.
if( item in 5..10)
So here I want to say if item NOT in 5..10
?? what is the proper construction?
Upvotes: 0
Views: 239
Reputation: 28362
You can use !in
operator:
if (item !in 5..10)
See documentation for a full list of operators:
Upvotes: 3