Standard built-in objects: String Flashcards
1
Q
What does String.prototype.slice()
do?
A
slice(start, end)
: Extracts part of a string from start
index up to, but not including, the end
index. Negative indices count from the end.
Example: "Hello".slice(1, 4) // 'ell'