Answers for "store input into array javascript"

0

store input into array javascript

values = [];

function addRecord() {
  var inp = document.getElementById('inputtext');
  values.push(inp.value);
  inp.value = "";  
}

function displayRecord() {
  document.getElementById("values").innerHTML = values.join(", ");
}
Posted by: Guest on April-18-2022

Code answers related to "store input into array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language