Is there a string.Empty in JavaScript, or is it just a case of checking for ""?
Is there a string.Empty in JavaScript, or is it just a case of checking
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Empty string, undefined, null, …
To check for a truthy value:
To check for a falsy value:
Empty string (only!)
To check for exactly an empty string, compare for strict equality against
""using the===operator:To check for not an empty string strictly, use the
!==operator: