diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-03 04:31:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 04:31:13 -0700 |
commit | fbf132752b743d0f43c3395da0699bee53da22df (patch) | |
tree | 56da43c86e1aebd24e3913b405e21d6f2812e9a3 /kotlin.html.markdown | |
parent | 247dc6e86c1421fa031e4b61c42c05ca6e09bfb0 (diff) | |
parent | c166f2acb295627c5ae305a6dd517a27ca8fece6 (diff) |
Merge branch 'master' into patch-1
Diffstat (limited to 'kotlin.html.markdown')
-rw-r--r-- | kotlin.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kotlin.html.markdown b/kotlin.html.markdown index 12008074..a6fac518 100644 --- a/kotlin.html.markdown +++ b/kotlin.html.markdown @@ -26,7 +26,7 @@ any parameters. */ fun main(args: Array<String>) { /* - Declaring values is done using either "var" or "val". + Declaring variables is done using either "var" or "val". "val" declarations cannot be reassigned, whereas "vars" can. */ val fooVal = 10 // we cannot later reassign fooVal to something else @@ -297,7 +297,7 @@ fun helloWorld(val name : String) { else -> println("none of the above") } - // "when" can be used as a function that returns a value. + // "when" can be used as an expression that returns a value. var result = when (i) { 0, 21 -> "0 or 21" in 1..20 -> "in the range 1 to 20" |