‫In Kotlin.
‫You can add comments to your code to provide explanations, notes and documentation.
‫Comments are not executed by the compiler or interpreter.
‫They are purely for human readers.
‫Kotlin supports two types of comments single line comments and multi-line comments.
‫Let's learn about these comments.
‫At first, I'll start with the single line comments.
‫Single line comments start with two forward slashes.
‫They extend from the forward slashes to the end of the line, and are used for commenting a single line
‫of code.
‫Single line comments are often used for short explanations or comments on a specific line of code.
‫For example, if I need to explain this line of code, I'll create here a comment.
‫So this single line comment explains this line.
‫Multi-line comments are enclosed with forward slash asterisk and asterisk forward slash delimiters.
‫They can span multiple lines and are used for commenting multiple lines of code or for writing longer
‫explanations.
‫Multi-line comments are often used for documenting functions, classes, or describing complex algorithms.
‫For example, inside this delimiter I'll explain some codes.
‫When you run the program, you should see the console output in the run or debug tabs at the bottom
‫of the IDE window.
‫The output will look similar to what we we learned before.
‫Hello my friend.
‫So these comments are not executed, so comments are crucial for making your code more readable, understandable
‫and maintainable.
‫They help you and other developers understand the code's purpose, how it works, and any important
‫considerations.
‫Good commenting practices can make it easier to collaborate on projects, troubleshooting and document
‫your code for future reference.