Using ternary operator in JavaScript to invoke two functions

Viewed 11060

Can this be done in JavaScript?

type == 1 ? function1() : function2();
2 Answers
Related