Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript display max amount of characters

var text = "blahalhahkanhklanlkanhlanlanhak";
var count = 35;

var result = text.slice(0, count) + (text.length > count ? "..." : "");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #display #max #amount #characters
ADD COMMENT
Topic
Name
8+3 =