typescript trim method 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();
var str = " Some text ";
str.trim();
let whiteSpace = ' ABCD ';
let noWhiteSpace = whiteSpace.trim();