📜  是空字符串 falsy - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:55.636000             🧑  作者: Mango

代码示例1
// This is dependent on the language you are using.
// In most high-level-languages (like JavaScript or Python) they are falsy.
if (""){
    console.log("This will never execute")
}

// However many low-level-languages (like C or C++) they are truthy, because
// they are just a pointer to some container, and a pointer that doesn't
// point to null is truthy.