JS String Slice Last n elementos
const str = 'ECMAScript 2015';
const n = 4;
console.log(str.slice(-n));
// Output: 2015
GutoTrosla
const str = 'ECMAScript 2015';
const n = 4;
console.log(str.slice(-n));
// Output: 2015