I recently came across the following line of code:
var watcherGlobal = (watcherGlobal) ? watcherGlobal : undefined; // crude singleton, todo refactor into function
What I do not understand is why is the condition for this ternary operator wrapped in parentheses? I have seen many ternary operators in code before, but this is the first time that I have seen the condition wrapped like this.