get last 4 letters in a string js code example Example: javascript get last n characters of string 'abc'.slice(-1); // c