Answers for "how show piece of long text in javascript"

1

how show piece of long text in javascript

function truncate(input) {
   if (input.length > 5) {
      return input.substring(0, 5) + '...';
   }
   return input;
};
Posted by: Guest on October-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language