Lession 6. JS Comment

Computer Education, Training & Tutorial Resources - ComputerEducationWorld.com
Home » Free Web Designing Courses » Introduction to JavaScript » Javascript For Beginners »

Comments can be used to make the code more readable.

Single line comments start with //.

<script type=”text/javascript”>

// This will write a header:

document.write(”<h1>This is a header</h1>”);

// This will write two paragraphs:

</script>

Multi line comments start with /* and end with */.

<script type=”text/javascript”>

/* The code below will write one

header and two paragraphs */

document.write(”<h1>This is a header</h1>”);

</script>

Comment can also be used for hiding scripts.

<script type=”text/javascript”>

/*

document.write(”<h1>This is a header</h1>”);

*/

</script>


• • •
 



captcha PHP Script Free PHP captcha script free php
Website Design by WebWalas.com