其他分享
首页 > 其他分享> > Array.of

Array.of

作者:互联网

Array.of

Array.prototype.slice.call(arguments)
Array.of(1, 2, 3);   // [1, 2, 3]
if (!Array.of) {
  Array.of = function() {
    return Array.prototype.slice.call(arguments);
  };
}

MDN参考地址

标签:slice,MDN,call,arguments,Array,prototype
来源: https://www.cnblogs.com/mengxiangzhi/p/16252568.html