Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #find #whitespace #string #js
ADD COMMENT
Topic
Name
6+8 =