[ad_1]
To work in node and browser, use replace with regex.
const num = "1,200"
const parsed = Number(num.replace(/,/g, ""))
0
[ad_2]
solved Format string ‘1,200’ to integer 1200, with javascript [duplicate]
[ad_1]
To work in node and browser, use replace with regex.
const num = "1,200"
const parsed = Number(num.replace(/,/g, ""))
0
[ad_2]
solved Format string ‘1,200’ to integer 1200, with javascript [duplicate]