Js USES the typeof method to determine the undefined type
- 2020-03-30 03:31:27
- OfStack
Js determines the undefined type
if (reValue== undefined)
{
alert("undefined");
}
It was found that the judgment could not be made, and the typeof method was used to check the data at last:
if (typeof(reValue) == "undefined")
{
alert("undefined");
}
Typeof returns a string, with six possibilities: "number", "string", "Boolean", "object", "function", "undefined"