rmvFrmArr(arr: Array, item);
arr. Source array.
item. Element to remove from the array.
The rmvFrmArr method removes an element from array.
This method returns True if the element is successfully removed from the array, otherwise it returns False.
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: