Setting a variable to undefined
- by AJ
Hello,
I'm a bit confused about Javascript undefined & null.
Firstly what does if (!testvar) actually do? Does it test for undefined and null or just undefined?
Secondly, once a variable is defined can I clear it back to undefined (therefore deleting the variable).
Thirdly, can I pass undefined as a parameter? e.g:
function test(var1, var2, var3) {
}
test("value1", undefined, "value2")
Thanks,
AJ