Comments in programming languages are used to document the programs. Comments are non-executable and are used to explain the code written in the program.  Different programming languages have different syntaxes for writing the comments in the program. Let’s have a look at a few of them.


Javascript, JAVA, PHP, Kotlin, TypeScript, Scala, Rust and C, C#, C++

 

/*
    This
    is
    multiline
    comment

*/



 // This is the Single line comment.



HTML, CSS, XML

 

/*
    This
    is
    multiline
    comment

*/



/*  This is the Single line comment  */



SQL

-- This is the Single line comment.

 

 

Python, Ruby, Elixir, and R

# This is the Single line comment.