<script>
  let buf = [10, 110, 20, 120, 30, 130];

  let filterBuf = buf.filter(function(n) {
    // 返回bool
    return n > 100;
  })

  console.log(filterBuf);
</script>

js filter语法_编程