| 123456789101112131415161718192021222324 | 
							- <!DOCTYPE html>
 
- <html lang="en">
 
- <head>
 
-     <meta charset="UTF-8">
 
-     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-     <title>Document</title>
 
- </head>
 
- <body>
 
-     <script>
 
-         /**
 
-          * rest 用于获取函数中的实参 其实就是替代arguments
 
-          */
 
-         function fn1(...rest) {
 
-             console.log(...rest)
 
-             console.log(arguments)
 
-         }
 
-         fn1(1,2,3,4,5,6)
 
-         function fn2(a,b,...c) {
 
-             console.log(a,b,...c)
 
-         }
 
-         fn2(3,4,5,6,78,9)
 
-     </script>
 
- </body>
 
- </html>
 
 
  |