I have this variable: 10 + 20 + 30 + 40 + 50 = 150
.
I want to know how I can use implode()
of JavaScript to remove anything that is in front of each number, it can be any sign or special characters, this string can also have several sizes.
Desired result:
var numero = 10 + 20 + 30 + 40 + 50 = 150;
var 10 = 10
var 20 = 20
var 30 = 30
var 40 = 40
var 50 = 50
var igual = 150
My code:
var valor = "10+20+30+40+50=150";
var separar = valor.split('+');//Nesse caso fica limitado ao sinal de adição
alert(adicao);