How to truncate a text with JavaScript

If we have a long long text and we only want to show our users some part of that text, well we need to truncate that text. In this tutorial I will show you how to do that with JavaScript.

And here is the source code:

Published by


Habibie is an Indonesian freelance frontend-backend web developer and cross platform mobile app programmer. He's also good at graphics design, video editing, visual effects and animation.

Leave a Reply

Your email address will not be published. Required fields are marked *