Replaces the elements from startIndex to (but not including) endIndex with replacement.
Returns a shallow copy without replacement if startIndex >= endIndex or if one or both indices
is not an integer.
Negative indices count backwards from the end of the array.
Replaces the elements from
startIndexto (but not including)endIndexwithreplacement. Returns a shallow copy without replacement ifstartIndex >= endIndexor if one or both indices is not an integer.Negative indices count backwards from the end of the array.
Example