Returns a copy of the array containing only the first num elements (or fewer if the array is shorter).
num
num — how many elements to keep from the start.
log [1,2,3,4].left(2) // [1,2]
Last updated 4 months ago