split by whitespace javascript
var text = "hoi how are you";
var arr = text.split(/\s+/);
split by whitespace javascript
var text = "hoi how are you";
var arr = text.split(/\s+/);
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+/)
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us