arr.join("\n")
时间: 2023-07-30 13:04:58 浏览: 165
JS 用6N±1法求素数 实例教程
回答: arr.join("\n")是将数组arr中的元素以换行符"\n"连接起来形成一个字符串。\[2\]在给定的引用中,可以看到使用join方法将数组\['hello', 'hi'\]中的元素以换行符连接起来,结果为"hello\nhi"。所以,arr.join("\n")的结果应该是"hello\nhi"。
#### 引用[.reference_title]
- *1* [es6 数组处理 arr.map arr.filter arr.find arr.findIndex arr.some arr.every](https://blog.csdn.net/u011565547/article/details/99748048)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [前端Array.join(‘\n‘)不同平台提交到后端结果不一样](https://blog.csdn.net/weixin_42318691/article/details/127403703)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [js基础--数组API](https://blog.csdn.net/weixin_45663702/article/details/123614768)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文