-
Autor
This seems really silly but how do I convert a decimal string ie "1234" to the number 1234
parseInt, Number and + dont seem to be supported!
This seems really silly but how do I convert a decimal string ie "1234" to the number 1234
parseInt, Number and + dont seem to be supported!
Yes, there is no easy way to do this, you could set an array with string numbers and then search for the right character inside your string inside a for, converting each string number to a real number.
let number = JSON.parse(string);
seillehs thx.
Wow, you are right, I assumed that JSON.parse needed an obj to work.