How to comment in java script
JavaScript Comments
Not all JavaScript statements are "executed".
Code after double slashes // or between /* and */ is treated as a comment.
Comments are ignored, and will not be executed:
See this coding to understand
<!DOCTYPE html>
<html>
<body>
<h1>Comments are NOT Executed</h1>
<p id="demo"></p>
<script>
var x = 5;
// var x = 6; I will not be executed
document.getElementById("demo").innerHTML = x;
</script>
</body>
</html>
No comments:
Post a Comment