Is there a way that I can define a macro similar to C/C++ macros in Javascript?
I want to use this for debug statements:
Something like
#ifdef TEST__
#define MYDEBUG(##x) debug(__FILE__,x)
#else
#define debug
#endif
Not necessarily similar, but I want to acheieve that functionality. Is there a way I can do that?
Thanks
Usage:
When “de” is false (production mode), the overhead is minimal.