I'm trying to do the following function:
<span id="our_price_display">R$ 71,90</span>
function calculaParcela(){
var regex = /\d+,\d+/g;
var texto = $(".our_price_display").text(); //id da div com o texto R$ 71,90
var valor = regex.exec(texto);
var insereValor = $("#valor-parcelado").text(valor.join(""));
console.log(insereValor);
var divide = insereValor / 3;
console.log(divide);
}
But on the console it returns me NaN.
What am I missing and what could be done to correct this operation?