xxxxxxxxxx
// Using slice() to trim a string to 10 characters
let message = "JavaScript runs everywhere on everything!";
console.log(message.slice(0, 10));
// Output: "JavaScript"
// Using slice() to trim a string from the 4th character to the end
console.log(message.slice(4));
// Output: "Script runs everywhere on everything!"
// Using slice() to trim a string from the 10th to the 20th character
console.log(message.slice(10, 20));
// Output: " runs ever"