Say I have the following construct appearing frequently in my code,
if (e.which==13){ ... }
...and I would like to make the code look a bit cleaner by writing instead:
ifEnterPressed{ ... }
Is there a way of defining an operator such as ifEnterPressed in Javascript?
Update
I have figured out that the basic issue is that Javascript does not support syntactic macros.