javascript get the last alphabet in 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);