How can I combine two arrays into one array in javascript?

This question already has an answer here:

  • How to append something to an array? 25 answers

  • 使用Array.prototype.concat方法:

    var result = hora.concat(self.aEstados.estados);
    

    使用Array.prototype.concat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)

    var combined = hora.concat( self.aEstados.estados );
    console.info( combined );
    
    链接地址: http://www.djcxy.com/p/17954.html

    上一篇: Map的keySet()和entrySet()的性能注意事项

    下一篇: 我怎样才能将两个数组组合成一个数组在JavaScript中?