Truncate Text In JS

PHOTO EMBED

Thu Mar 24 2022 12:51:49 GMT+0000 (Coordinated Universal Time)

Saved by @chrichrisp #javascript

const truncate = (input) => `${input.substring(0, 25)}...`;
content_copyCOPY

Use in blog card in home page to show just a small part of the text of the article

https://dev.to/abodmicheal/truncate-text-in-react-js-and-js-22k2