summaryrefslogtreecommitdiffhomepage
path: root/kotlin.html.markdown
diff options
context:
space:
mode:
authorBoris Verkhovskiy <boris.verk@gmail.com>2024-04-03 02:02:49 -0700
committerGitHub <noreply@github.com>2024-04-03 02:02:49 -0700
commit616e40816dfdf90c2418477327729169db0274b3 (patch)
tree0b5ae76e529c34f6648442815f535626eaeebf69 /kotlin.html.markdown
parent3e22775a641831a82c59a3b6197240b2fcd9a76b (diff)
parent638494ae2a0c089717f2bfff965da52e3b15a4f9 (diff)
Merge branch 'master' into elixir-casing
Diffstat (limited to 'kotlin.html.markdown')
-rw-r--r--kotlin.html.markdown4
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"