type script get first 20 character of a string code example Example: js only first 50 letters 'Hiya how are you'.substring(0,50);