I am working on array with javascript. I am able to add the array by using push. However, I am not sure how to edit an items. As you can see in this link below
, I have the push method for my add item, which is working fine. But what should I do with my edit button if I want to change replacing the old item with the new one? Do I need to use foreach to do it? Help will be appreciated jsfiddle.net/hin123/tcVhN/127/
I am stuck with this part $scope.saveDetail = function (data) { //angular.foreach }