In many languages, there are two ways to comment:
- Open/close (often used for multi-line comments), i.e. /* my comment */
- Single open (often used for end-of-line comments), i.e. // my comment
This may be trivial for you, but if your language does not rely on line breaks to mark the end of a code line, then it may actually make more sense to stick with the multi-line comment syntax as a best-practice.
var a = 'b'; // initialize a
var b = 'c';
Now, let's minify it to one line:
var a = 'b'; // initialize a var b = 'c';
Our second assignment statement is commented out.