Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"
 
PREVIOUS NEXT
Tagged: #javascript #show #characters #string
ADD COMMENT
Topic
Name
2+4 =