📅  最后修改于: 2022-03-11 15:04:12.243000             🧑  作者: Mango
if (variable !== null) {
//code
}
//Or, if you're expecting null as a string ('null'):
if (variable != null) {
//code
}
//!== means not equal to, just like !=, but !== checks that the datatype is the same, whereas != doesn't.
//Example: (null !== "null") = true (null != "null") = false