()
| 2 | let totalProfit = 0; |
| 3 | |
| 4 | function addItem(){ |
| 5 | count = count + 1; |
| 6 | let container = document.getElementById("itemInformations"); |
| 7 | container.appendChild(document.createTextNode("Item " + count + " ")); |
| 8 | // Create an <input> element, set its type and name attributes |
| 9 | let input = document.createElement("input"); |
| 10 | input.type = "number"; |
| 11 | input.name = "item" + count; |
| 12 | input.id = "item" + count; |
| 13 | input.class = "item"; |
| 14 | input.placeholder = "Enter Weight (KG)" |
| 15 | |
| 16 | container.appendChild(input); |
| 17 | |
| 18 | container.appendChild(document.createTextNode(" Profit " + count + " ")); |
| 19 | // Create an <input> element, set its type and name attributes |
| 20 | let input2 = document.createElement("input"); |
| 21 | input2.type = "number"; |
| 22 | input2.name = "profit" + count; |
| 23 | input2.id = "profit" + count; |
| 24 | input.class = "item"; |
| 25 | input2.placeholder = "Enter Profit"; |
| 26 | |
| 27 | container.appendChild(input2); |
| 28 | |
| 29 | // Append a line break |
| 30 | container.appendChild(document.createElement("br")); |
| 31 | } |
| 32 | |
| 33 | function deleteItem(){ |
| 34 |
nothing calls this directly
no outgoing calls
no test coverage detected