Pushes val onto the start of the array and returns the array itself (enabling chaining).
val
val — value to prepend.
arr = [1,2] arr.prepend(0) log arr // [0,1,2]
Last updated 3 months ago