Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if string is empty

let str1 = "Hello world!";
let str2 = "";
let str3 = 4;
console.log(str1.length === 0)
console.log(str2.length === 0)
console.log(str3.length === 0)

false
true
false
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #check #string #empty
ADD COMMENT
Topic
Name
4+2 =