RW
Published on

Writing Comments in Javascript and other languages

Authors

Comments in Javascript:

// Single line comment

/*
  Multi-line comment
  */

Comments in C/C++:

// Single line comment

/*
  C++ adds multi-line comments
  */

Comments in Ruby:

# Single line comment

Comments in Python:

# Single line comment

Keep in mind that these are not all the ways to write comments in each of the languages. These are some of the most used style of comments for describing how some code functions.

Sign up to get more stuff like this in your inbox