function

shift . array . sncode

VERSIONlatest Remove first element from array and return it.

SHIFT

NAME

shift - Remove first element from array and return it.

SYNOPSIS

shift(array)

DESCRIPTION

This function remove the first element of an array. and return it.

So if a = [1,2,3,4,5]; shift(a) return 1 and a has value 2,3,4,5.

EXAMPLES

        a = [1,2,3,4,5];

        a.top();

        a.last();

        a.shift();

        a;

        a.pop();

        a;

    will return es=151[2,3,4,5]5[2,3,4].

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>