Mega Code Archive
String slice()
Syntax
string.slice(num1, num2)
string.slice(num)
The slice() method returns the characters between the indexed positions num1 and num2.
The first character is in position 0.
If num2 is a negative number, the string counts from the end of the string to end the slice.
If passing a single index, the method will return all characters until the end of the string.