set.reset method

Peter Michaux petermichaux at gmail.com
Wed Feb 15 22:41:17 PST 2012


Sorry. Incomplete message before and premature send.


Set.prototype.reset = function() {
   this.empty();
   for (var i = 0, ilen = arguments.length; i < ilen; i++) {
       this.add(arguments[i]);
   }
};

Peter

On Wed, Feb 15, 2012 at 10:39 PM, Peter Michaux <petermichaux at gmail.com> wrote:
> I don't know how rich the committee wants to make objects in ES.next.
>
> For example, what about a set.reset method?
>
> Set.prototype.reset = function() {
>    this.empty();
>    for (var i = 0, ilen = arguments.length; i < ilen; i++) {
>
>    }
> }


More information about the es-discuss mailing list