Skip to content

Instantly share code, notes, and snippets.

View Jamesernator's full-sized avatar

James Browning Jamesernator

View GitHub Profile

Array<T>

Array<T>.prototype.*

  • concat(: (T | Array<T>)[]): T[]
    concat(items) 🔒
    • Returns a new array that is the concatenation of this and all items. Non-array parameters are treated as if they were arrays with single elements.
    • ES3
    • ['a'].concat('b', ['c', 'd']) → [ 'a', 'b', 'c', 'd' ]
  • copyWithin(:number, :number, ?:number): this