prepend()

The prepend linq operator returns a new linq object that contains all of the elements of the collection with the "value" parameter prepended (i.e., added to the front of the collection).
var arr = [2, 3, 4, 5, 6];

// col = [1, 2, 3, 4, 5, 6]
var col = $linq(arr).prepend(1).toArray();

Last edited Oct 4, 2012 at 3:30 AM by battousai999, version 1