filmov
tv
Check for empty & null JavaScript strings #javascript #shorts

Показать описание
We go through 2 ways to check for empty, null, or strings with text. There are subtle differences between the following that can trip you up if you aren't aware:
if (!s1)
if (s1)
if (s1==="")
if (s1!==="")
if (!s1)
if (s1)
if (s1==="")
if (s1!==="")