javascript keep only last 10 characters of string code example Example: javascript get last n characters of string 'abc'.slice(-1); // c