3 ms·
Kotlin has [] but it can't be used with the null-safe navigation operator (?.) If you want to index a datastructure that could be null, you use ?.get(...) inst
by half-kh-hacker 7y ago
Kotlin has [] but it can't be used with the null-safe navigation operator (?.)
If you want to index a datastructure that could be null, you use ?.get(...) instead of ?[...]