.left(num)

Description

Returns the left-most num characters of the string (or the whole string if shorter).

Parameters

  • num — number of characters to extract.

Usage

log "abcdef".left(3) // "abc"

Last updated

Was this helpful?