Not really. The best you can do is declare all your variables with var. When evaluating an unassigned variable without var, the evaluation results in a runtime error. If the unassigned variable was declared with var, the evaluation results in the undefined value, or NaN in numeric contexts.