Eric H. Jung wrote:

var boundedStack = new Array(500);
function push(o) {
 if (boundedStack.unshift(o) > 500)
   boundedStack.pop();
}

If you really want to preallocate 500 elements then your condition will always be true. Otherwise I'd just use var boundedStack = [];
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to