Comments are normally used to describe pieces of code. They don't get processed by the compiler and so can be used to document the code. Comments are important because:

  • They allow other programmers can be able to follow your code. This is important for teamwork.
  • Commented code are easier to maintain.
  • They make it easier to generate documentation for your code.
  • They allow you to get upto speed with your own code after alog time without viewing the code .

You are likely familiar with comments in Kotlin especially if you are coming from C-family languages like Java, C# and C++.
Both block comments and line comments are supported:

//This is a line comment

And this is a
block comment in Kotlin