Blogger Information
Blog 18
fans 0
comment 2
visits 10436
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
rest语法|剩余参数|归并参数
go0
Original
543 people have browsed it
  1. // rest语法|剩余参数|归并参数
  2. f = (...arr) => arr;
  3. console.log(f(1, 2, 3, 4, 5, 6, 7, 8, 9));
  4. // ...后面跟集合数据,可以将集合展开 ***********************
  5. console.log(...[1, 2, 3, 4, 5, 6]);
  6. f = (a, b, ...arr) => `${a},${b},"|",${arr}`;
  7. console.log(f(1, 2, 3, 4, 5, 6));
  8. f = (a, b, ...arr) => arr;
  9. console.log(f(1, 2, 3, 4, 5, 6));
  10. f = (a, b, ...arr) => `${arr}`;
  11. console.log(f(1, 2, 3, 4, 5, 6));

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post