重学ES系列之过滤数组


<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过滤数组title>
head>
<body>
<script>
let arr = [1,2,4];
let newArr = arr.filter((e)=>e!==1);
console.log(newArr);
script>
body>
html>

作者:Vam的金豆之路

主要领域:前端开发

我的微信:maomin9761

微信公众号:前端历劫之路


你可能感兴趣的:(ES6)