text: function foo(a, b) {
      var i, rest = [];
      if (arguments.length > 2) {
          for (i = 2; i < arguments.length; i++) {
              rest.push(arguments[i]);
          }
      }
      console.log('a = ' + a);
      console.log('b = ' + b);
      console.log(`rest数组[${rest}]`);
  }
  foo(2, 4);
  foo(1, 2, 3);