As much as it might be considered overhead by some, the best approach is to use functions, shorthand and ternary conditions as a replacement for macros. Most of the JavaScript libraries do that these days. For example:
1.)
var a, b;
if ( !a ) {
a = b;
}
// shorthand approach:
var a, b;
a = a || b;
2.)
var a, b, c;
if ( true ) {
a = b;
} else {
a = c;
}
// shorthand approach:
var a, b, c;
a = ( true ) ? b : c;
3.)
var a, b, c, d;
b = a;
c = b;
d = c;
// shorthand approach:
var a, b, c, d;
d = c = b = a;
Several methods in jQuery are all essentially macros, although you have to define them as functions first, since the browser does not automatically interpret them. For example, some of the more popular of these are each(), next() and filter().