how to get last character in string js code example Example: jquery last character in string myString.slice(-1);