Is there a difference between doing
if(something === undefined) {
//handle
}
and
if(typeof(something) === "undefined") {
//handle
}
please? Which is better to use and why? Are there any risks involved?
Is there a difference between doing
if(something === undefined) {
//handle
}
and
if(typeof(something) === "undefined") {
//handle
}
please? Which is better to use and why? Are there any risks involved?