Home >Web Front-end >JS Tutorial >js uses typeof method to determine undefined type_javascript skills
js determines undefined type
if (reValue== undefined) { alert("undefined"); }
I found that I couldn’t tell, so I finally checked the information and needed to use the typeof method:
if (typeof(reValue) == "undefined") { alert("undefined"); }
typeof returns a string, there are six possibilities: "number", "string", "boolean", "object", "function", "undefined"