shift/remove n no of first elements from an array





8
Date Submitted Fri. Aug. 4th, 2006 4:49 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags Array | JavaScript
Comments 0 comments
This code will remove specified no of elements in an js array , from the beggining of it.


function shiftElts(Obj,elts) {
  for( var i = 0;  i<elts; i++ ) {
   Obj.shift();
  }
};

 

Comments

There are currently no comments for this snippet.

Voting