Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get first two letter of an array javascript

var str = '012123';
var strFirstThree = str.substring(0,3);

console.log(str); //shows '012123'
console.log(strFirstThree); // shows '012'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #letter #array #javascript
ADD COMMENT
Topic
Name
5+2 =