Skip to content

Instantly share code, notes, and snippets.

@essamamdani
Created April 21, 2020 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save essamamdani/a20f2808d2ec1d6e2971669647ead950 to your computer and use it in GitHub Desktop.
Save essamamdani/a20f2808d2ec1d6e2971669647ead950 to your computer and use it in GitHub Desktop.
These types of comments can also be used when you want to test some functionality like you created a function but comment that out and create one more with a slight difference to check the working.
<script>
var a = 2;
var b = 7;
var c = 2;
document.write("Answer is " + sum());
/* function sum(){
return a+b;
} */
function sum(){
return a+b+c;
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment