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

Function ctrlAddInput

assets/js/groceryList.js:140–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139 //Adds new item to array and UI
140 var ctrlAddInput = function(){
141 var inp,newItem;
142 inp = uiCtrl.getInput();
143
144 if(inp.item==""){
145 alert("Please enter an item");
146 uiCtrl.clear();
147 }else{
148 newItem = itemCtrl.addItem(inp.item,inp.quantity);
149 uiCtrl.addListInput(newItem);
150 uiCtrl.clear();
151
152 }
153
154 };
155
156 //For deleting each item
157 var ctrlDelInput = function(event){

Callers 1

setsEventListenerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected