js/scripts.js
/** 
 * Creates and adds Product to list. Does not persist.
 * @param {string} text - new input
 */
Creates and adds Product to list. Does not persist.
@param {string} text - new input
Creates and adds Product to list . Does not persist . @param { string } text - new input
function addProduct(text) {
  const product = {
    text,
    id: Date.now(),
  };
  productList.push(product);
  renderProduct(product);
}
function addProduct ( text ) { const product = { text , id : Date . now ( ) , } ; productList . push ( product ) ; renderProduct ( product ) ; }
Creates and adds Product to list.
Creates and adds Product to list .
//productList.sort( (a,b) => (a.text > b.text) ? 1 : ((b.text > a.text) ? -1 : 0));