iEntry 10th Anniversary CSS Snippets JavaScript Snippets

 
 





Comments In JavaScript

Every good programmer comments their code, so if anyone has to edit the code they know what is happening. There are a lot of times you may be the person writing the code, and come back later and think what was I doing here. If you have very well commented code, then this reduces some of that confusion. To comment out code you could use /* and */, everything in between the two will be ignored by the browser. This type of comment system is used when creating multiple line comments. You can also use a double backslash for single line comments.

<language="JavaScript" type="text/Javascript">
 /*This is my first script. 
   I think I should start by
   telling the world welcome.*/

 document.write("Welcome World.")

 // Done greeting the world.

</script>