js trim whitespace from end code example
Example 1: remove whitespace javascript
var str = " Some text ";
str.trim();
Example 2: javascript trim spaces
value = value.trim();
var str = " Some text ";
str.trim();
value = value.trim();