📅  最后修改于: 2022-03-11 15:04:33.234000             🧑  作者: Mango
if (typeof variable == "undefined") {...} --> return true if variable undefined
//An empty string evaluates to FALSE in JavaScript so you can just do:
if (variable) {...}