Kotlin Syntax
Semicolons are optional. Blocks use curly braces. fun declares a function and main is the entry point. Comments use // and /* */.
Example
// a comment
fun main() {
println("Syntax") /* inline */
}Exercise
Declare a function.
main() {}Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.