pokeBack(value)

Replaces the value at the end of a collection, the value that would be returned by pop().

On collections

Usage

  • pokeBack(value)

Example

var array = [1, 2, 3];
array.pokeBack(4);
array

Related

  • peekBack()

    Returns the value at the end of a collection, the value that would be returned by pop().

  • poke(value)

    Replaces the value at the beginning of a collection, the value that would be returned by shift().

  • pop()

    Removes a value from the end of a collection, and returns that value.

  • push(...values)

    Adds values to the end of a collection.