Answers for "if value is empty including whitespace js"

2

javascript check if blank space

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

find whitespace in string js

var containsWhitespace = function(str){
	return /\s/g.test(s);
};
console.log(containsSpaces("foo bar"));//Returns true
console.log(containsSpaces("foobar"));//Returns false
Posted by: Guest on November-16-2021

Code answers related to "if value is empty including whitespace js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language