javascript not null
if (variable !== null) {
console.log("Var is NOT null");
}
javascript not null
if (variable !== null) {
console.log("Var is NOT null");
}
js not equal to null
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us