Answers for "javascript only allow show first few characters from a string"

1

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"
Posted by: Guest on December-10-2020

Code answers related to "javascript only allow show first few characters from a string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language