JavaScript - Single line comment: //

In the case of single-line comments from start tags to the end of the line, each character is interpreted as a comment. these characters will not be evaluated.

//

Description

//
Used keywords: //
Data:
  • text -

Examples

JavaScript

Single line comment the possible of use:
x = 5 * y; // x = xy
// y = 123;
if (x > 0) // x == true
   x=5;

JavaScript

Other pieces of example codes:
if (y<5)
   y = y/ 3.14;    // y = 1.234
         // a = true
       // x=7
       // a = true 
       // z = 25
  // a4 = true
Languages: en hu cz sk