get 3 first char of a string js code example
Example 1: javascript get first character of string
var str="Hello Folks!"
var firstStringChar = str.charAt(0); //H
Example 2: js substring first 4 numbwe
mystring = "9862 ....... -pack size 1 - SST Unspun Label (Roll) CAT#: 9862";
mystring = mystring.substring(0, 4);
alert(mystring.trim());