- 4
What is comment
2 Answers
+ 2
/* In real life, you know what's a comment unless you're a robot */
/* In coding, a comment is something you think and express about any part of a code. You may want to express it explicitly in the code, but you are afraid that it may cause exceptions. So you put it in between /* */ or in the same line after //. This makes sure it doesn't get compiled. */
<!-- Comments are important as they can be used to describe parts of a code. It's a good practice to do this. -->
//Check out this code:
https://code.sololearn.com/W79Duid8e1x2/?ref=app
+ 1
//single line comment
/*multi line
comment
*/
comments are ignored by the compiler so you can write something there to help you and others to read your code