What am I doing wrong?
finalcode = "(9/9)" var ind3 = finalcode.lastIndexOf(")"); var inde3 = finalcode.indexOf("(") let value = finalcode.slice(inde3 + 1, ind3) text.innerHTML = parseInt(value); document.getElementById("output").innerHTML += text.outerHTML;
It makes the content equal to 9, not 9/9 which is 1. Why is it not working?(It is also Incompatible with*+-etc.)
please, send a repl instead.
It is not clear what external variables like text and the HTML looks like.