💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
![](https://img.kancloud.cn/be/be/bebeffb4a80a27dbd8a90f90a385723e_1146x420.png) ![](https://img.kancloud.cn/fb/8a/fb8a87a0b16dbfc0b5a5e4bb6f341ad0_1141x178.png) ![](https://img.kancloud.cn/1e/11/1e11832c342ee383ba3a61a6d8d187f8_1165x190.png) ![](https://img.kancloud.cn/ab/42/ab42dc56b71ebb9fc4394f8caa8dce8f_1129x102.png) ![](https://img.kancloud.cn/3f/b7/3fb723292d706fb36d4c3a0cfe14b09c_764x117.png) ``` ~function(){ function myFlat(){ let result=[], _this = this; let fn = (arr)=>{ for (let i = 0; i < arr.length; i++) { const item = arr[i]; if(Array.isArray(item)){ fn(item); continue; } result.push(item); } } fn(_this); return result; } Array.prototype.myFlat = myFlat }() ``` ![](https://img.kancloud.cn/da/0a/da0a3e55143bd0533956ff3bf2686ae8_334x110.png)