.first()

Description

This method simply returns the first item of a string or an array

Parameters

First takes no parameters

Usage On Arrays

arr = [1,2,3,4,5]
// setup the array

log arr.first()
// 1

Usage On Strings

str = "12345"
// setup the string

log str.first()
// 1

Last updated