trim and uppercase in javascript code example
Example 1: remove whitespace javascript
var str = " Some text ";
str.trim();
Example 2: trim text and add ... js
const truncate = (input) => input.length > 5 ? `${input.substring(0, 5)}...` : input;