JavaScript Example (Program)
Learn Details

What is Javascript Comments ?

javascript comment का उपयोग आप अपने जावास्क्रिप्ट के code को समझने या समझाने के लिए क्या जाता है|

Note :- javascript comment execute नही होते है

1. Single line Comment :

इसे Single line को Comment करने के लिए किया जाता है | इसका use // (double slash) के साथ किया जाता है

How to Write

<script type="text/javascript"> //your coment </script>

Example :

<script type="text/javascript">
// this comment is ingale line comment
document.write("><h1>Welcome, Teach Coders></h1>")
</script>

2. Multipule line Comment:

इसे Multipules lines को Comment करने के लिए किया जाता है | इसका use /* (single slash के साथ star) के साथ किया जाता है

How to Write

<script type="text/javascript">
/*your multipule line commnet
1
2
3
4
5
..more line
*/.
</script>

Example :

<script type="text/javascript">
/* this is create by Teach Coders
Create Date :10/6/2020*/
document.write("><p>Welcome, Teach Coders></p>")
</script>