Last active
February 27, 2020 07:36
-
-
Save Audhil/3e6cf35d295a2e17965bbc98de9f9e1b to your computer and use it in GitHub Desktop.
kotlin scope functions
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
fun main() { | |
val valueIs = "Jack and jill went up the hill!" | |
val result = valueIs.let { | |
it.contains("help") | |
} | |
println(valueIs) // o/p - Jack and jill went up the hill! | |
println(result) // o/p - false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment