Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"use strict";
var log = function log(x) {
console.log(x);
};
var ary = [10, 23, 4, 0, 77];
var c = ary.copyWithin(0, 2); // [4, 0, 77, 0, 77]
var ary = [10, 23, 4, 0, 77];
var d = ary.copyWithin(0, 2, 3); // [4, 23, 4, 0, 77]
var ary = [10, 23, 4, 0, 77];
var e = ary.copyWithin(-1, 2, 3); // [10, 23, 4, 0, 4]
log(e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment