javascript - oneArray's objects + twoAarray's objects to and of oneArray -


i have 2 arrays're contained objects , need put elements(objects) first array how ? mybe underscore?


plain js:

arr = [1,2,3,4] arr1 = [6,7] arr = arr.concat(arr1) 

using underscore

arr = [1,2,3,4] arr1 = [6,7]  arr.push(arr1) arr = _.flatten(arr) 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -