I know how to remove element of array by pop() method & splice() method, for example
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.pop();
document.getElementById("demo").innerHTML = fruits;
my question is how do I do these actions through input element in html? for example by create a button to toggle hide or show element of array so I want to toggle between remove "Mango" for example and add it again?