A value is said to be "true" if it is either a non-empty string or a non-zero number. Anything else, such as a null value or an empty string, is regarded as false. Additionally, an array is false if it is open and correct if it has at least one entry. Null is also thought to be incorrect.
To learn full-stack development in detail, sign up for Intellipaat's Full Stack Developer Online Course and learn from industry experts.