I'm still confused on the purpose of the comments, like is it necessary?
Comments are an important part of coding. They exist in every single language because they are so useful. They tell you and more importantly anyone else reading your code what it is, how it works, your thinking and even potential errors and pitfalls when editing. Un commented code is frowned upon by many. There are many schools of thought on commenting. However, the main two are: first comment everything. Good but hard to maintain. Second comment what things do ie blocks of code. be explicit not implicit. you can save commenting everything by using variable names that say what they are. variables like a n var1 will have you commenting till the cows come home. names like arrEmployees is much better.
they can be necessary for large pieces of code that may become confusing to make out, and they are very useful when you give your code to someone else for whatever reason so he may know what every code is for.
Comments makes the program easy to understand whenever another programmer checks on it.
ok, thanks guys
Yes. Exemple sometimes you forget what you did in your code, especially after long time you dont read it or it's a big file contents many lines of code