Search the Blog

Sunday, August 11, 2019

JavaScript Comments usage and sample example

To add annotations, hints, or exclude/hide some code from being executed JavaScript provides two ways of commenting code line as in JAVA programming language.

Single line Comment (//)
 what we are writing  after // will not be executed
  example :-// this is www.dizsweb.com

Multi-line Comment (/**/)
 what we are writing  after // will not be executed
  example :-
/*
In this website you will get all type of code logic and content with example with code and definitions
of different type ion which java javascript database sql , sql server.
*/


NOTE:- Usage of HTML comments in javascript code is bad practice

No comments:

Post a Comment

Translate