Collect.js skip() Method Last Updated : 30 Nov, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The skip() method is used to skip the given number of elements from collection and returns the remaining collection elements. Syntax: collect(array).skip(size) Parameters: The collect() method takes one argument that is converted into the collection and then skip() method is applied on it. The skip() method holds the size (number of elements that you want to skip from collection) as parameter. Return Value: This method returns the remaining collection elements. Below example illustrate the skip() method in collect.js: Example 1: JavaScript const collect = require('collect.js'); const collection = collect(['Geeks', 'GFG', 'GeeksforGeeks', 'Welcome']); const skipped = collection.skip(2); console.log(skipped.all()); Output: [ 'GeeksforGeeks', 'Welcome' ] Example 2: JavaScript const collect = require('collect.js'); let obj = [ { name: 'Rahul', marks: 88 }, { name: 'Aditya', marks: 78 }, { name: 'Abhishek', marks: 87 } ]; const collection = collect(obj); const skipped = collection.skip(1); console.log(skipped.all()); Output: [ { name: 'Aditya', marks: 78 }, { name: 'Abhishek', marks: 87 } ] Comment More infoAdvertise with us Next Article Collect.js skipWhile() Method A ashokjaiswal Follow Improve Article Tags : JavaScript Web Technologies Collect.js Similar Reads Collect.js pipe() Method The pipe() method is used to hold a callback function and apply this function into the collection and returns the corresponding result. Syntax: collect(array).pipe(callback)Parameters: The collect() method takes one argument that is converted into the collection and then the pipe() method is applied 2 min read Collect.js skipUntil() Method The skipUntil() method is used to skip the collection elements until the given callback returns true and then returns the remaining items in the collection: Syntax: collect(array).skipUntil(callback) Parameters: The collect() method takes one argument that is converted into the collection and then s 1 min read Collect.js skipWhile() Method The skipWhile() method is used to skip the collection elements while the given callback function returns true and returns the remaining collection elements. Syntax: collect(array).skipWhile(callback) Parameters: The collect() method takes one argument that is converted into the collection and then s 1 min read Collect.js split() Method The split() method in collect.js is used to break a collection into the given number of groups. Syntax: collect(array).split() Parameters: The collect() method takes one argument that is converted into the collection and then split() method is applied on it. Return Value: This method returns a colle 1 min read Collect.js shift() Method The shift() method is used to remove the first element from collection and returns it. Syntax: collect(array).shift() Parameters: The collect() method takes one argument that is converted into the collection and then shift() method is applied on it. Return Value: This method returns the first elemen 1 min read Collect.js pop() Method The pop() method is used to remove the last element from collection and returns the popped element. Syntax: collect(array).pop() Parameters: The collect() method takes one argument that is converted into the collection and then pop() method is applied on it. Return Value: This method returns the pop 1 min read Like