array.js 833 B

123456789101112131415161718192021222324252627282930
  1. function excludeFirstFiveResults([first, second, third, fourth, fifth, ...rest]) {
  2. return rest;
  3. }
  4. function excludeFirstFiveResults([first, second, third, fourth, fifth, ...rest] = DEFAULT_FIVE_RESULTS) {
  5. return rest;
  6. }
  7. function excludeFirstFiveResults([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest] = [1, 2, 3, 4, 5]) {
  8. return rest;
  9. }
  10. function excludeFirstFiveResults([first, second, third, fourth, fifth, ...rest]: Result[]) {
  11. return rest;
  12. }
  13. const excludeFirstFiveResults = ([first, second, third, fourth, fifth, ...rest]) => {
  14. return rest;
  15. }
  16. class A {
  17. excludeFirstFiveResults([first, second, third, fourth, fifth, ...restOfResults]) {
  18. return restOfResults;
  19. }
  20. }
  21. promise.then(([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest]) => {
  22. return rest;
  23. });