PP.rmvFrmArr

Syntax

rmvFrmArr(arr: Array, item);

Parameters

arr. Source array.

item. Element to remove from the array.

Description

The rmvFrmArr method removes an element from array.

Comments

This method returns True if the element is successfully removed from the array, otherwise it returns False.

Example

To execute the example, add a link to PP.js scenario file to HTML page. Determine an array of integers and remove an element from the array:

// Determine an integer array
var elements = [5, 9, 6, 7, 2];
console.log("Source array of elements: [" + elements + "]");
// Remove the 7 element from the array
PP.rmvFrmArr(elements, 7);
console.log("Changed array of elements: [" + elements + "]");

After executing the example the element 7 is removed from the specified array:

Initial array of elements: [5,9,6,7,2]

Changed array of elements: [5,9,6,2]

See also:

PP