remove

Removes the element at the specified index location from the list.

Syntax:

$[ScriptVariable]::remove(int index)

Parameters:

index (int): the position of the list element to remove from the variable. If not specified, the assumed index value is 0, which is the index position of the first element in the list.

Example:

The following example illustrates the syntax for the remove list method (using the $recipients list variable created in the add example):

$recipients::remove(1)

$print($recipients)

Output:

['Engineering Group']['Winston Smythe']