This project is read-only.

concat()

The concat linq operator returns a new linq object that contains all of the elements from the collection concatenated with all of the elements from a second collection.
var arr1 = [1, 2, 3, 4, 5];
var arr2 = [6, 7, 8, 9, 10];
var col1 = $linq(arr1);

// col2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var col2 = col1.concat(arr2).toArray();

// col3 = [1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e'];
var col3 = col1.concat(['a', 'b', 'c', 'd', 'e']).toArray();

Last edited Sep 7, 2012 at 6:55 AM by battousai999, version 4