skip(count)

Bypasses a specified number of elements in a sequence and then returns the remaining elements.

Syntax

Parameters

count
Type: number
The number of elements to skip before returning the remaining elements.
Return Value

An iteratable object that contains the elements that occur after the specified index in the input sequence.

Examples

var grades = [ 59, 82, 70, 56, 92, 98, 85 ];

var lowerGrades = $from(grades).orderByDesc("$").skip(3);

document.writeln("All grades except the top three are:");
lowerGrades.each("document.writeln($)");

/*
 This code produces the following output:

 All grades except the top three are:
 82
 70
 59
 56
*/

Last edited May 18, 2012 at 10:27 AM by suckgamoni, version 1

Comments

No comments yet.