mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-02 08:58:49 -05:00
25 lines
468 B
Markdown
25 lines
468 B
Markdown
---
|
|
title: collections.Last
|
|
linkTitle: last
|
|
description: Slices an array to the last N elements.
|
|
categories: [functions]
|
|
keywords: []
|
|
menu:
|
|
docs:
|
|
parent: functions
|
|
function:
|
|
aliases: [last]
|
|
returnType: any
|
|
signatures: [collections.Last INDEX COLLECTION]
|
|
relatedFunctions:
|
|
- collections.After
|
|
- collections.First
|
|
- collections.Last
|
|
aliases: [/functions/last]
|
|
---
|
|
|
|
```go-html-template
|
|
{{ range last 10 .Pages }}
|
|
{{ .Render "summary" }}
|
|
{{ end }}
|
|
```
|