console.log(Boolean({}));
Share
Talk Programming , Career, Mental Health, Talk Personal Finance ❤️ Post a query and receive responses ✅
Post a query and receive responses. Ask anything, Ask Mitra ❤️
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.
{} is not equals to null
Boolean() checks wheather it is true or not
and
only undefined and null return false
for example
let a;
then Boolean(a) returns false as a is undefined there
likewise a=null
then Boolean(a) return false too as a is null
BUT
let a ={}
then Boolean(a) returns true as
a is niether equals to undefined or null