VBA->JS: Comments (Syntax)

Commenting code is important. JavaScript and C# use the same commenting conventions, which differ somewhat from VBA’s. Comments can be on a single line, similar to VBA; they can also extend across multiple lines:

' A comment in VBA is preceded by
' a single quote character.
' If the comment should break to
' multiple lines, a single quote
' character must be at the
' beginning of each line.
// Instead of a single quote,
// JavaScript uses two forward slashes.

/* JavaScript also supports
comments over multiple lines.
Precede the comment with a
forward slash plus an asterix
and end it with an asterix
plus forward slash. */

Leave a Reply