I have search a lot and i got multiple way to check if statement is true or false. I found the standard function to check for null, undefined, or blank variables is to use truthy value like.
if(value) { }
Is there a standard function to check for null, undefined, or blank variables in JavaScript?
I also found that the '===' operator is better to use over '==' operator.
Which equals operator (== vs ===) should be used in JavaScript comparisons?
I need the shorter and save way for doing this. Now i am confuse with these two solution. Do i need to follow the standard way to check the statement is true or false or i need to use the '===' operator.