Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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