Commenting your code may seem arbitrary, but doing so while you’re writing your code may just save you lots of time and frustration when you need to look back through your code and understand your thought process at the time.
What are C-style comments
is a comment.
Here’s an example of multiple-line C-style comments:
/* This is a comment */
/* C-style comments can also span to
as many lines as you'd like,
as this sentence is showing here. */
How about one-line comments of C++ style?
This type of comment begins with
and continues up to the next line break –
// This is a one-line comment!
Then there are one-line comments with the HTML comment-opening sequence
of HTML comments (-->).
Here’s an example:
<!-- It works just like a comment beginning with //
<!-- --> of HTML comments
HTML-style comments are not commonly found in the middle
It’s advised however to use HTML comments rather than // comments so that the code is hidden from older or outdated browsers.