Created
June 5, 2020 02:26
-
-
Save sagarpatel288/32b60cbbdfb4e5d73e69772cfec2cef2 to your computer and use it in GitHub Desktop.
Get even or null
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun getEvenOrNull(randomNumber: Int): Int? = | |
if (randomNumber.rem(2) == 0) randomNumber else null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment