css property trim spaces code example
Example 1: trim space in jquery
var str = " Hello World! ";
alert(str.trim());
Example 2: trim text and add ... js
const truncate = (input) => input.length > 5 ? `${input.substring(0, 5)}...` : input;