if ((typeof OA != 'undefined') && OA)
, OA. , .
if(OA)
This assumes that it exists OAand immediately translates it into a logical one and evaluates it.
The second example will throw a javascript exception if the variable OAhas never been declared - the first example avoids this.
See my answer here for a more detailed explanation of several values undefinedin javascript.
source
share