Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

truncate text javascript

const truncate = (string) => {
  const newText = string.substring(0, 5);
  return newText;
};

console.log(truncate("abcdefgh"));
//abcde
Source by www.textbotonline.com #
 
PREVIOUS NEXT
Tagged: #truncate #text #javascript
ADD COMMENT
Topic
Name
1+5 =