I'm creating an application where a question has come up. In this application there may at some point be a variable where the value of it should be an empty string ( ) but, as I am forced to work with another team where I do not have full knowledge of the project, depending on the situation the return can be null .
Today, with all the knowledge I've gained, I can only think of using a multiple condition if this happens, as in the code below
var teste;
if(teste === null || teste.length == 0){
return true;
}
Is there any way I can validate this teste === null
in a more "beautiful" way?
NOTE : beautiful I say more readable.