Note : This post is just for fun. Please be careful about these tricks.
Code comment is to provide complementary comment to abstract codes. We will introduce two comment styles while we are debugging our codes. we should avoid these styles in production codes.
1. if else style
Only execute eatKfc()
//* eatKfc(); /*/ eatMcdonalds(); //*/
Only execute eatMcdonalds()
/* eatKfc(); /*/ eatMcdonalds(); //*/
Execute both
//* eatKfc(); //*/ eatMcdonalds(); //*/
2. Block comment
Don't comment
/**/ var foo = function() { ... }; /**/
Block comment 1
/** / var foo = function() { ... }; /**/
Block comment 2
/** var foo = function() { ... }; /**/
These are old age comment styles. Now the advanced IDEs support shortcut keys for commenting some codes.