ES6 new syntax of Rest and Spread Operators

Rest and Spread Operators.md
Why we need rest and spread operators?

var showCollections = function(id, ...collection){ console.log(collection instanceof Array); }; showCollections(42, 'movies', 'music');

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zyzwxx.html