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'
Also in JavaScript:
- javascript change frame background
- compare strings js
- angular load json file with httpclient
- react redux npm
- jquery selected label option
- how to iterate object inside object in javascript
- create fooer on print page with jquery
- how to get selected list item value in javascript
- reduce method javascript
- javascript onclick open url same window
- js loop through associative array
- javascript variables
- dynamic loop variable .each create hash javascript
- align left text in reactstrap
- js get anchor
- js how to add element in object
- js convert order to char
- javascript get last word in string
- import jquery into angular 8
- javascript array exists check
- how to add data to array in javascript dynamically
- array methods in javascript
- chartjs start at 0
- add 1 year to current date javascript