Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

contains whitespace js function

var containsWhitespace = function(str){
	return /s/g.test(s);
};
console.log(containsSpaces("foo bar"));//Returns true
console.log(containsSpaces("foobar"));//Returns false
 
PREVIOUS NEXT
Tagged: #whitespace #js #function
ADD COMMENT
Topic
Name
3+4 =