if判断值不能为空(null、undefined、""),但可以为0

65 阅读1分钟
if (!value && String(value) !== '0') {}