.trim(idx1,idx2)

Description

Trim allows you to create a new array of the items from within two indexes

Parameters

Trim takes two parameters, the start of the trimming and the end of the trimming

Usage On Arrays

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

log [1,2,3,4].trim(1,-1)
// [1,2,3]
// remove the last item

Usage On Strings

log 1324.trim(2,3)
// 32

log 1234.trim(1,-1)
// 132
// remove the last letter

Last updated