function renewStock(){

  
  console.log(`idPicked is ${idPicked}`)
  console.log(`titlePicked is ${titlePicked}`)
  console.log(`pricePicked is ${pricePicked}`)
  console.log(`nowColor is ${nowColor}`)
  console.log(`nowColorName is ${nowColorName}`)
  console.log(`nowStock is ${nowStock}`)
  console.log(`buyAmount is ${buyAmount.innerText}`)
  console.log(`sizePicked is ${sizePicked}`)

  let corres = false
  for (i = 0; i < productList.length; i++) {

    //check if there's same item in buying list 
    if (parseInt(productList[i].id) === idPicked && productList[i].color.code === nowColor && productList[i].size === sizePicked) {
      console.log(productList[i].size === sizePicked)
      //if yes, console log the list item
      console.log(productList[i])
      //item qty that's already in cart
      //send the value to plus minus func
      console.log(productList[i].qty)
      storStock = productList[i].qty
      corres = true
    } 
  }
  //if now size has no corresponding item in storage

  if (!corres) {
    storStock = 0
  }
  
  

  

}
//renew stock number and change plus minus visual
renew stock number and change plus minus visual
renew stock number and change plus minus visual
function renewStock(){
  console.log(`idPicked is ${idPicked}`)
  console.log(`titlePicked is ${titlePicked}`)
  console.log(`pricePicked is ${pricePicked}`)
  console.log(`nowColor is ${nowColor}`)
  console.log(`nowColorName is ${nowColorName}`)
  console.log(`nowStock is ${nowStock}`)
  console.log(`buyAmount is ${buyAmount.innerText}`)
  console.log(`sizePicked is ${sizePicked}`)
  let corres = false
  for (i = 0; i < productList.length; i++) {
    if (parseInt(productList[i].id) === idPicked && productList[i].color.code === nowColor && productList[i].size === sizePicked) {
      console.log(productList[i].size === sizePicked)
      console.log(productList[i])
      console.log(productList[i].qty)
      storStock = productList[i].qty
      corres = true
    } 
  }
  if (!corres) {
    storStock = 0
  }
}
function renewStock ( ) { console . log ( ` ${ idPicked } ` ) console . log ( ` ${ titlePicked } ` ) console . log ( ` ${ pricePicked } ` ) console . log ( ` ${ nowColor } ` ) console . log ( ` ${ nowColorName } ` ) console . log ( ` ${ nowStock } ` ) console . log ( ` ${ buyAmount . innerText } ` ) console . log ( ` ${ sizePicked } ` ) let corres = false for ( i = 0 ; i < productList . length ; i ++ ) { if ( parseInt ( productList [ i ] . id ) === idPicked && productList [ i ] . color . code === nowColor && productList [ i ] . size === sizePicked ) { console . log ( productList [ i ] . size === sizePicked ) console . log ( productList [ i ] ) console . log ( productList [ i ] . qty ) storStock = productList [ i ] . qty corres = true } } if ( ! corres ) { storStock = 0 } }
renew stock number and change plus minus visual
renew stock number and change plus minus visual
//check if there's same item in buying list  //if yes, console log the list item //item qty that's already in cart //send the value to plus minus func //if now size has no corresponding item in storage