.left(num)

Description

Left allows you to take part of an array or a string from the left

Parameters

Left takes one parameter, the number of letters or items to take

Usage On Arrays

log [1,3,2,4].left(2)
// [1,3]

Usage On Strings

log 1324.left(2)
// 13

Last updated