This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Extract a part of a string from position 7:
let text = "Apple, Banana, Kiwi"; let part = text.slice(7); document.getElementById("demo").innerHTML = part;
Because the slice starts at a specified spot in the string and goes to the end position (
) it always goes from left to right. If an end position is not specified, the selection is to the end of the string.