undefined - Why is there an isNaN() function in JavaScript but no isUndefined()? -
Why is a isNaN ()
function in javascript whilst isUndefined ()
This should be written as:
typeof (...)! = "Undefined"
Is there an issue that I do not see?
In my opinion this is actually ugly just isUndefined (testValue)
.
Usage case var === undefined
works almost everywhere, Except for those cases, where either undefined
is assigned to a value, or var
is undefined.
Due to such a ceremony can not be present, it is clear from the latter case. If var
is undefined, then it is assumed that calling the function isUndefined (var)
will result in ReferenceError
. Although the introduction of a new keyword, e.g. Asunderfinder Verge
can solve this problem.
But despite being valid, both of the above cases are poor use of Javascript, which is why I believe that such a keyword does not exist.
Comments
Post a Comment