Which method of checking if a variable has been initialized is better/correct? (Assuming the variable could hold anything (string, int, object, function, etc.))
if (variable === undefined) {}
works just fine, and only checks for undefined.