Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/xpath/functions/last/index.md
6546 views
---
title: last slug: Web/XPath/Functions/last
---

{{ XsltRef() }}

The last function returns a number equal to the context size from the expression evaluation context.

Syntax

last()

Returns

An integer equal to the context size from the expression evaluation context.

Notes

  • This is often used with the position() function to determine if a particular node is the last in a node-set.

Defined

XPath 1.0 4.1

Gecko support

Supported.