filmov
tv
Check for empty & null JavaScript strings #javascript #shorts
![preview_player](https://i.ytimg.com/vi/yeVsg0xfAKY/maxresdefault.jpg)
Показать описание
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!==="")