Answers for "check if string is empty javascript with space empty"

2

javascript check if blank space

function isEmptyOrSpaces(str){
    return str === null || str.match(/^ *$/) !== null;
}
Posted by: Guest on July-01-2021
1

javascript check if string is empty

var string = "not empty";
if(string == ""){
  console.log("Please Add");
}
else{
  console.log("You can pass"); // console will log this msg because our string is not empty
}
Posted by: Guest on June-19-2021

Code answers related to "check if string is empty javascript with space empty"

Code answers related to "Javascript"

Browse Popular Code Answers by Language