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