🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
308 B
Executable File
308 B
Executable File
nth()
The nth method creates a new collection consisting of every n-th element:
const collection = collect(['a', 'b', 'c', 'd', 'e', 'f']);
const nth = collection.nth(4);
nth.all();
// ['a', 'e']