javascript remove empty space from string code example
Example 1: remove whitespace javascript
var str = " Some text ";
str.trim();
Example 2: typescript remove whitespace from string
let whiteSpace = ' ABCD ';
let noWhiteSpace = whiteSpace.trim();