keep only first n caracters javascript code example
Example 1: js only first 50 letters
'Hiya how are you'.substring(0,50);
Example 2: javascript only allow show first few characters from a string
var string = 'Hey, I am good';
string.substring(0,3); // show first 3 characters
//result "Hey"