trim text and add ... js code example
Example: trim text and add ... js
const truncate = (input) => input.length > 5 ? `${input.substring(0, 5)}...` : input;
const truncate = (input) => input.length > 5 ? `${input.substring(0, 5)}...` : input;