How to write comments in JQUERY OR Javascript?

There are couple of ways to write the comments in the jquery or javascript code.

1. IN-LINE Comments: write your comment after '//'. Please refer below program for reference.
2. MULTI-LINE Comments: write your comment in between '/*' and */'. Please refer below program for reference.

<!DOCTYPE html>
<html lang="en">
<head>

    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

</head>

<body>
    <!--This is HTML comment -->

    <script type="text/javascript">
        // In-Line JavaScript comment
        var Website = "www.jqueryexamplecode.blogspot.com"; //Website Name.
        /* This is multi line comment 
        in the javascript code */
        alert("This is javascript or jquery comments example");
    </script>

</body>
</html>


Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar