1.Array对象 例 1.1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> function sum(a) { var s = 0; for (var i = 0; i < a.length; i++) { s = s + a[i]; } return s; } var a = [4,2,3]; document.write(sum(a)); </script> </head> <body> 1) do sum through array 马克-to-win </body> </html>
更多请见:https://blog.csdn.net/qq_43650923/article/details/102148517
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。