how to get last five character of string code example Example: how to get last string in javascript 'abc'.slice(-2);