Answers for "check whitespace in javascript"

2

check whitespace in javascript

if (/\s/.test(str)) {
    // It has any kind of whitespace
}
Posted by: Guest on August-04-2020
0

js find space in string

if(str.indexOf(' ') >= 0){
    console.log("contains spaces");
}
Posted by: Guest on December-18-2019

Code answers related to "check whitespace in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language