标签:blog http io ar java for 2014 on cti
<!DOCTYPE> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>每天一个JavaScript实例-标量参数和数组参数的功能性区别</title> <script> window.onload = function(){ var items = new Array('apple','orange','cherry','lime'); var sep = "*"; func(items,sep); console.log(items); console.log(sep); } function func(strings,separator){ var result = ""; //console.log(strings.length); for(var i = 0; i < strings.length; i++){ result+= strings[i] + separator; } separator = result; strings[strings.length] = result; } </script> </head> <body> </body> </html>
每天一个JavaScript实例-标量参数和数组参数的功能性区别
标签:blog http io ar java for 2014 on cti
原文地址:http://blog.csdn.net/waiting7436/article/details/40049909