- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between single-line and multi-line comments in JavaScript?
Single Line comment
The following is a single line comment in JavaScript. Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.
// This is a comment. It is similar to comments in C++
Multi-Line comment
The following is a multi-line comment in JavaScript.
/* * This is a multiline comment in JavaScript * It is very similar to comments in C Programming */
- Related Articles
- Java multi-line comments
- How do we use multi-line comments in JavaScript?
- Java single line comments.
- How do we use single line comments in JavaScript?
- How to write multi-line comments in C#?
- What is the difference between line and line segment?
- What is the difference between comments /*...*/ and /**...*/ in JavaScript?
- What is the difference between line and a line segment?
- How to write single-line comments in C#?
- How to put multi-line comments inside a Python dict()?
- What is the difference between height and line-height?
- What is the difference between /* */ and /** */ comments in Java?
- What is the difference between single and double quotes in JavaScript?
- How to execute Python multi-line statements in the one-line at command-line?
- Difference between Security Market Line (SML) and Capital Market Line (CML)

Advertisements