js string to determine whether it is empty

js page to determine whether a string is empty

 

Example: var str = "";

               If(str !== null || str!== "") such a null operation is very inaccurate.

    

Should be changed to:  

                If(str.length == 0), the judgment accuracy is higher

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326716878&siteId=291194637