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

Collection.prototype.first()

Return the first file from the collection.

Syntax

collection.first() File collection.first() null

Description

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

Examples

Collection non-empty

Empty collection.

Subscribe to our newsletter!