function populateForm() {


  //TODO: Add an <option> tag inside the form's select for each product
  var selectElement = document.getElementById('items');
  for (var i in arrayOfProductNames) {
    console.log('the for is working!');
    var nameOfItem = arrayOfProductNames[i].slice(0, -4)
    new Items(arrayOfProductNames[i], nameOfItem);
    var newOption = document.createElement("OPTION");
    newOption.textContent = arrayOfProducts[i].nameOfItem;
    selectElement.appendChild(newOption);
  }

}
// (the things in the Product.allProducts array) into the drop down list.
(the things in the Product.allProducts array) into the drop down list.
( the things in the Product . allProducts array ) into the drop down list .
function populateForm() {
  var selectElement = document.getElementById('items');
  for (var i in arrayOfProductNames) {
    console.log('the for is working!');
    var nameOfItem = arrayOfProductNames[i].slice(0, -4)
    new Items(arrayOfProductNames[i], nameOfItem);
    var newOption = document.createElement("OPTION");
    newOption.textContent = arrayOfProducts[i].nameOfItem;
    selectElement.appendChild(newOption);
  }
}
function populateForm ( ) { var selectElement = document . getElementById ( 'items' ) ; for ( var i in arrayOfProductNames ) { console . log ( 'the for is working!' ) ; var nameOfItem = arrayOfProductNames [ i ] . slice ( 0 , - 4 ) new Items ( arrayOfProductNames [ i ] , nameOfItem ) ; var newOption = document . createElement ( "OPTION" ) ; newOption . textContent = arrayOfProducts [ i ] . nameOfItem ; selectElement . appendChild ( newOption ) ; } }
(the things in the Product.allProducts array) into the drop down list.
( the things in the Product . allProducts array ) into the drop down list .
//TODO: Add an <option> tag inside the form's select for each product