0 points

Array.prototype.slice() - JavaScript | MDN


dashboard

Mon May 11 2020 19:55:36 GMT+0000 (UTC)

Posted by @Ulises Villa #javascript

let unboundSlice = Array.prototype.slice
let slice = Function.prototype.call.bind(unboundSlice)

function list() {
  return slice(arguments)
}

let list1 = list(1, 2, 3) // [1, 2, 3]
content_copy Copy

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice