Undefined variables will be evaluated to undefined. 'undefined' is a type of value such as null and NaN, so it will look like this:
if ( typeof(oldins) == 'undefined' )
Edit: fixed for each comment. Leaving the answer as comments are useful, but there were more correct answers.
source
share