mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-25 08:13:29 +03:00
fix grammar errors
This commit is contained in:
parent
e56c62e0d3
commit
f801ff3fe0
@ -109,7 +109,7 @@ fun helloWorld(val name : String) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
When a function consists of a single expression then the curly brackets can
|
When a function consists of a single expression then the curly brackets can
|
||||||
be omitted. The body is specified after a = symbol.
|
be omitted. The body is specified after the = symbol.
|
||||||
*/
|
*/
|
||||||
fun odd(x: Int): Boolean = x % 2 == 1
|
fun odd(x: Int): Boolean = x % 2 == 1
|
||||||
println(odd(6)) // => false
|
println(odd(6)) // => false
|
||||||
@ -306,7 +306,7 @@ fun helloWorld(val name : String) {
|
|||||||
println(result)
|
println(result)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We can check if an object is a particular type by using the "is" operator.
|
We can check if an object is of a particular type by using the "is" operator.
|
||||||
If an object passes a type check then it can be used as that type without
|
If an object passes a type check then it can be used as that type without
|
||||||
explicitly casting it.
|
explicitly casting it.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user