Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Concat arrays, Concat

// Concat arrays

// HTML
// <button onclick="Concat()">concat</button>

var numbers1 = [1, 2, 3, 4, 5]
var numbers2 = [10,20,30,40,50]
console.log(numbers1)
console.log(numbers2)

function Concat() {
   var sum = numbers1.concat(numbers2)
    console.log(sum)
}

// Result
// (5) [1, 2, 3, 4, 5]
// (5) [10, 20, 30, 40, 50]
// (10) [1, 2, 3, 4, 5, 10, 20, 30, 40, 50]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Concat #Concat
ADD COMMENT
Topic
Name
3+8 =