how to check if string has something except blank spaces code example
Example: check whitespace in javascript
if (/\s/.test(str)) {
// It has any kind of whitespace
}
if (/\s/.test(str)) {
// It has any kind of whitespace
}