<!DOCTYPE html>    
<html lang="en">    
<head>    
    <meta charset="UTF-8">    
    <title>ES6解构代替concat数组拼接</title>  
</head>    
<body>  
<script type="text/javascript">
let a = [1, 2, 3]
let b = [4, 5]
let c = [...a, ...b]
console.log(c)
</script>      
</body>    
</html>

 

相关文章:

  • 2021-06-20
  • 2022-12-23
  • 2021-11-22
  • 2021-08-19
  • 2022-12-23
  • 2021-07-24
  • 2022-01-08
  • 2021-05-18
猜你喜欢
  • 2021-12-09
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案