Eliminar Whitespace JavaScript
var str = " Some text ";
str.trim();
Gifted Goshawk
var str = " Some text ";
str.trim();
"hello world".replace(/\s/g, "");
.replace(/ /g,'')
var str=" I have outer spaces ";
var cleanStr=str.trim();//trim() returns string with outer spaces removed
removing white spaces