Advertisement
vinissh

concat.js

Jan 18th, 2021
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const nums = [ 1, 2, 3, 4, 5]
  2. const nums2 = [6, 7, 8, 9]
  3. console.log(nums.concat(nums2))
  4.  
  5. const filhas = ['Oilson', 'Dillan']
  6. const filhos  =  ['Clinton', 'Djalma']
  7. const todos =  filhas.concat(filhos)
  8. console.log(filhas, filhas, todos )
  9.  
  10. console.log([].concat([10, 20, 30, 40, 50], [60, 70, 80]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement