js remove a code example
Example 1: delete element html javascript
function removeElement(elementId) {
// Removes an element from the document.
var element = document. getElementById(elementId);
element. parentNode. removeChild(element);
}
Example 2: remove in javascript
function arrayRemove(arr, value)
{
return arr.filter(function(ele){
return ele != value;
});
}
//var result = arrayRemove(array, 6);// result = [1, 2, 3, 4, 5, 7, 8, 9, 0]