Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
47 lines (32 loc) · 922 Bytes

File metadata and controls

47 lines (32 loc) · 922 Bytes
Copy raw file
Download raw file
Edit and raw actions

Comments

Comments are statements that will not be executed by the interpreter, comments are used to mark annotations for other programmers or small descriptions of what your code does, thus making it easier for others to understand what your code does.

In Javascript, comments can be written in 2 different ways:

  • Line starting with //:
// This is a comment, it will be ignored by the interpreter
var a = "this is a variable defined in a statement";
  • Section of code starting with /*and ending with */, this method is used for multi-line comments:
/*
This is a multi-line comment,
it will be ignored by the interpreter
*/
var a = "this is a variable defined in a statement";

Mark the editor's contents as a comment

Mark me as a comment
or I'll throw an error
/*
Mark me as a comment
or I'll throw an error
*/
assert(true);

Morty Proxy This is a proxified and sanitized view of the page, visit original site.