textContent vs innerHTML

label.textContent = `${option} - R$ ${parseFloat(price).toFixed(2)}`;

label.innerHTML = `${option} <br><small>R$ ${parseFloat(price).toFixed(2).replace('.', ',')}</small>`;


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *