题解 | 新数组
新数组
https://www.nowcoder.com/practice/bee781a51bc944bbad20f3c2ca798890
<!DOCTYPE html> <html> <head> <meta charset=utf-8> </head> <body> <script type="text/javascript"> const _delete = (array,index) => { // 补全代码 return array.filter((item,i) => i !== index) } console.log(_delete([1,2,3],1)); </script> </body> </html>