【文件属性】:
文件名称:js常用数组操作方法简明总结
文件大小:29KB
文件格式:PDF
更新时间:2020-12-04 11:38:28
alert js 操作
//javascript 中的数组分割
var colors = ["red","green","blue"];
//alert(colors.toString());
alert(colors.join("|")); //返回结果是red|green|blue
var colors = ["red","green","blue",null];
alert(colors.join("|"));//red|green|blue|
//注意当数组里面有值是null或者是undefined的时候 返回的结果是以空的字符串表示的
------------------------------------