+ 2
why do we write comment line even when it is ignored by the compiler ??
8 Réponses
+ 3
To leave notes, or to dummy out a block of code you want to be able to put back easily.
+ 3
It is usually used to make the program more efficient and more understandable.
+ 3
Comment lines are important for leaving some notes or necessary info in your codes.
+ 2
Comments are explanatory statement which shows, what did code actually do.
+ 2
If you are sharing your code with someone who's a coder himself he/she might get confused on some part of your code. So for his/her better understanding use of comment line in your code is efficient.
0
thanks Zen 🙂
0
comment are used in program to clarify either the purpose of the program or the purpose of some statement.
0
Ever had a hard time reading someone's handwriting or forget something you were going to say? Comments make your code quick to understand why it's there and what its doing. Ideally they should be used sparingly as you should be making easy to read code by properly naming functions, variables, and breaking out features to separate functions.