3 ms·
Sometimes it is "easier" to just type: if (isThisReturningEmpty()) {} instead of typing: if (isThisReturningEmpty() === "") {} And if you know something could
by invisible 16y ago
Sometimes it is "easier" to just type:
if (isThisReturningEmpty()) {}
instead of typing:
if (isThisReturningEmpty() === "") {}
And if you know something could return 0 (which is not empty), you should know to do a type-sensitive check). You are trading off HAVING to set types with HAVING to check types when needed (I think the latter is better).