Comments
Block comment style
Block comments are indented at the same level as the surrounding code. They may be in /* … */
or //
-style. For multi-line /* … */
comments, subsequent lines must start with *
aligned with the *
on the previous line, to make comments obvious with no extra context. “Parameter name” comments should appear after values whenever the value and method name do not sufficiently convey the meaning.
/*
* This is
* okay.
*/
// And so
// is this.
/* This is fine, too. */
someFunction(obviousParam, true /* shouldRender */, 'hello' /* name */);
Comments are not enclosed in boxes drawn with asterisks or other characters.
Do not use JSDoc (/** … */
) for any of the above implementation comments.