is empty string falsey
There are only six falsey values in JavaScript:
- undefined
- null
- NaN
- 0
- "" (empty string),
- false
is empty string falsey
There are only six falsey values in JavaScript:
- undefined
- null
- NaN
- 0
- "" (empty string),
- false
is empty string falsy
// 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.
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