ArrayLast

Description

Gets the last element from an array.

Returns

The last array element.

Syntax

ArrayLast(array)

Category

History

ColdFusion (2018 release): Added this function.

Parameters

Parameter

Req/Opt

Description

Array

Required

The input array from which the last element is to be displayed.

See also

Example

<cfscript>
 animals = ['cat','dog','fish','bison'];
 lastAnimal=ArrayLast(animals);
 writeOutput("The last element of the array is: " & lastAnimal); // returns "bison"
</cfscript>

 Adobe

Dapatkan bantuan lebih cepat dan lebih mudah

Pengguna baru?

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online