copyWithin

fun copyWithin(target: Int, start: Int, end: Int = definedExternally): S(source)

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Parameters

target

If target is negative, it is treated as length+target where length is the length of the array.

start

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

end

If not specified, length of the this object is used as its default value.