Last active
August 8, 2017 06:36
-
-
Save CDRussell/2a19ebf65b9d37f1148c138b7f65e471 to your computer and use it in GitHub Desktop.
Kotlin - Range Example with Silent Cast
This file contains hidden or 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
| val i = 10.5 | |
| if (i in 1..10) { | |
| println("$i is within the range of 1-10") | |
| } else { | |
| println("$i is not in range of 1-10") | |
| } | |
| // outputs "10.5 is within the range of 1-10" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment