WARNING: The [sjs-3] engine was deprecated, use [sjs-4] instead. See sjs-4: last.

Collection.prototype.first()

Return the last file from the collection.

Syntax

collection.last() File collection.last() null

Description

Return the last file from the collection or null if the collection is empty.

Examples

Collection non-empty

Empty collection.

Subscribe to our newsletter!