MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / deleteItem

Function deleteItem

assets/js/KnapsackProblem.js:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33function deleteItem(){
34
35 // Container <div> where dynamic content will be placed
36 let container = document.getElementById("itemInformations");
37 // 5 remove child is called to remove child (br, input ,text) for 1 item
38 if (container.hasChildNodes() && count!=1) {
39 container.removeChild(container.lastChild);
40 container.removeChild(container.lastChild);
41 container.removeChild(container.lastChild);
42 container.removeChild(container.lastChild);
43 container.removeChild(container.lastChild);
44 count = count - 1;
45 }
46}
47
48function resetBtn(){
49 let resultContainer = document.getElementById("result");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected