Answers for "find the words separated by whitespace in a string javascript"

0

split by whitespace javascript

var text = "hoi how     are          you";
var arr = text.split(/\s+/);
Posted by: Guest on May-24-2021
1

find the words separated by whitespace in a string javascript

// find words separated by whitespace in a string js

var text = "hoi how     are          you";
var arr = text.split(/\s+/)
Posted by: Guest on April-18-2022
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 "find the words separated by whitespace in a string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language