Multiline Comments

By: Dusty Arlia
Published on March 6, 2013
Last Updated on Sunday, July 12, 2015 at 2:56 PM
Total Updates: 2

While programming you might want to insert a multiline comment into your code. Multiline comments are mainly used to write comments that are longer than your average comment. They are often used at the beginning of programs to show the name of the program, who wrote it, on what date it was created, and a description of what the program does. Here is an example:

Program Name: Homepage Slideshow
Author: Dusty Arlia
Created on: 3/6/2013
Description: Automatically flips through pictures on a 12 second interval.

The actual comment goes in between the opening and closing delimiters. The opening delimiter is a string of characters: a forward slash followed by an asterisk (/*) and the closing delimiter is an asterisk followed by a forward slash (*/). You can also use multiline comments as a single line comment like so:

var i = 1; /*This is a multiline comment being used on a single line*/