I am trying to split the string "1 + 2 / 3 * 4 - 5 " to display "+" "/" "*" "-" to be saved into an array to, the same to be done to the number, so that I call each number and op' into a function to calculate it in BODMAS(/*+-) order.
The string can be longer and shorter as it is a user input calculation.
<p id="demo"></p>
<script>
function myFunction() {
var str = "1+2/3*4-5";
var res = str.split([0-9]);
document.getElementById("demo").innerHTML = res;
}
</script>
/^, named variables like in the expression2x + 3 = 0, or non-integers like2.3?