function fillCompleteStars(rating) {
  const count = Math.floor(rating);

  for (let i = 0; i < count; i++) {
    stars[i].classList.add('star-filled');
  }

  for (let i = count; i < starCount; i++) {
    stars[i].classList.remove('star-filled');
  }

  if (partialStar) {
    partialStar.classList.remove('partially-filled');
    partialStar.style.width = '0%';
  }

  if (count !== rating) {
    partialStar = stars[count].querySelector('.star-partial');
    partialStar.classList.add('partially-filled');
    partialStar.style.width = `${(rating - count) * 100}%`;
  }
}
Fills the stars based on the given rating.

@param {number} rating - The rating to be represented by the stars.