Clarification about usage of undefined in this code?
I was reading some code for a js library and I saw this:
// make sure undefined is undefined
var undefined;
I have looked up the proper way to check for undefined things in
javascript a few times before and found things posts such as:
How to check for "undefined" in JavaScript?
How to determine if variable is 'undefined' or 'null'
typeof !== "undefined" vs. != null
Is that piece of code a good thing to add on or is it unnecessary or
something in the middle?
No comments:
Post a Comment