-
Comments
Comments in programming are like notes that you can write down to help you remember things. It's like if you were doing a puzzle and wanted to remind yourself which piece goes where, then you would write it down on a piece of paper. Comments in programming are like that, except they go inside the code instead of on a separate piece of paper. They make sure that when someone else looks at your code, they know what each part does.
-
-
Single Line Comments
-
A single line comment is a non-executable string that hold one line of text (a word, phrase, sentence, or code).
Php
Example of single line comment in php.
<?php
// This is a single line comment
Javascript
Example of single line comment in javascript.
// This is a single line comment
Python
Example of single line comment in python.
# This is a single line comment
Dart
Example of single line comment in dart.
void main() {
 // This is a single line comment
}

Go
Example of single line comment in go.
package main

func main() {
	// This is a single line comment
}

-
-
-
Multiline Comments
-
A multiline line comment is a group of non-executable strings that hold one or more lines of text (phrases, sentences, or code).
Php
Example of multiline comment in php.
<?php
/*
This is a multiline comment

that can span many lines
*/
Javascript
Example of multiline comment in javascript.
/*
This is a multiline comment

that can span many lines
*/
Python
Example of multiline comment in python.
"""
This is a multiline comment

that can span many lines
"""
Dart
Example of multiline comment in dart.
void main() {
 /*
 This is a multiline comment

 that can span many lines
 */
}

Go
Example of multiline comment in go.
package main

func main() {
	/*
	 This is a multiline comment

	 that can span many lines
	*/
}

-
-