html加js代码
1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 8 <title>Document</title> 9 </head> 10 11 <body> 12 <script> 26 function sums(...rest){ 27 let nums=0 28 for(let a=0; a<rest.length; a++){ 29 nums=rest[a] 30 } 31 console.log(nums) 32 } 33 sums(12,15,14) 34 </script> 35 </body> 36 37 </html>
标签:26,rest,js,let,计算,加法,Document From: https://www.cnblogs.com/BlogRegisterqin/p/17219857.html