IR Framework

Array.remove Method

Removes elements with specific values from an Array.
object.remove (value[, count])

Arguments

object
Required. Always the name of an Array object.


value
Required. The value to search for within the Array object.


count
Optional. The number of matching elements, beginning at the beginning of the Array object, to remove from object.



Return Value

The Array.remove method returns the number of elements that were removed from object.

Remarks

The following example illustrates the use of the Array.remove method.

var a = new Array("a", "c", "b", "d", "b", "e", "b");

Console.Writeln(a.remove("k").toString());      //  returns 0
Console.Writeln(a.toString());                  //  returns a,c,b,d,b,e,b
Console.Writeln(a.remove("b", 1).toString());   //  returns 1
Console.Writeln(a.toString());                  //  returns a,c,d,b,e,b
Console.Writeln(a.remove("d", 6).toString());   //  returns 1
Console.Writeln(a.toString());                  //  returns a,c,b,e,b
Console.Writeln(a.remove("b").toString());      //  returns 2
Console.Writeln(a.toString());                  //  returns a,c,e


Requirements