Comments in JavaScript

Hi friends,

Today i learned some basics of JavaScript. Lets see how to comment in javascript.

The Single line comment is simply like as other language comments.


 <script type="text/javascript">
 // Write a heading
 document.write("<h1>Hi My name is Tha.Su</h1>");
 // Write two paragraphs:
 document.write("<p>I have two brothers.</p>");
 document.write("<p>My native is kanchipuram.</p>");


The multi-line comment example is here,


<script type="text/javascript">
The code below will write
one heading and two paragraphs
document.write("<h1>What’s your name?</h1>");
document.write("<p>Tell about your family.</p>");
document.write("<p>Are you from?.</p>");



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s