javascript read last x letters of string code example
Example 1: get last char javascript
var lastChar = myString[myString.length -1];
Example 2: how to get last string in javascript
'abc'.slice(-2);
var lastChar = myString[myString.length -1];
'abc'.slice(-2);