Control function arguments

Control function arguments

  1. function A(a) { ... }
  2. A(undefinedVar);

results in error.

how i control function argument to prevent undefined arguments input ?