match last 2 character of string javascript 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"