Understand DOM javascript?

I have this piece of code but I dont understand the presence of:” subTotal = subTotalElement.textContent “

function updateSubtotal(product) {
  console.log('Calculating subtotal, yey!');
  // const price
  // const quantity
  const price = product.querySelector('.price span');
  const quantity = product.querySelector('.quantity input');
  const subTotalElement = product.querySelector('.subtotal span'); //HTML element

   

  const subTotal = price.textContent * quantity.value; //input work with  input.value

 subTotal = subTotalElement.textContent ; //to change the HTML
  return subTotal;
}