Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created August 23, 2015 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/d5329b755dcf93ada500 to your computer and use it in GitHub Desktop.
Save chuck0523/d5329b755dcf93ada500 to your computer and use it in GitHub Desktop.
(function() {
var a, b, m, n, ref;
a = [1, 3, 5];
b = [1, 3, 5];
m = [0, 1, 2, 3, 4, 5];
n = [0, 1, 2, 3, 4];
console.log(m.slice(1, 4));
console.log(m.slice(0, 4));
console.log(m.slice(1));
console.log(m.slice(0));
console.log(m.slice(1, -1));
[].splice.apply(m, [0, 2].concat(ref = ['a', 'b', 'c'])), ref;
console.log(m);
console.log('world'.slice(1, 4));
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment