second to last letter of string to number js code example
Example: javascript string get last two character
var member = "my name is Mate";
var last2 = member.slice(-2);
alert(last2); // "te"
var member = "my name is Mate";
var last2 = member.slice(-2);
alert(last2); // "te"