<script>
  let buf = [10, 110, 20, 120, 30, 130];
  let mapBuf = buf.map(function(n) {        
    return n * 2;
  })

  console.log(mapBuf);
</script>

js map语法_编程