join 分割数组

返回一个字符串。该字符串是通过把 arrayObject 的每个元素转换为字符串,然后把这些字符串连接起来,在两个元素之间插入 separator 字符串而生成的。
separator可以传可以传,不传默认为,

   let array = ['周欢','嗯嗯','good','hahah']
    console.log(array, 333) //["周欢", "嗯嗯", "good", "hahah"]
    let test = array.join(".")
    console.log(test, 333) //周欢.嗯嗯.good.hahah 
原文地址:https://www.cnblogs.com/antyhouse/p/10277462.html