I am trying to convert 1,100.00
or 1,800.00
to 1100
or 1800
by using Javascript Number() function but it gives NaN
.
For Example:
var num = "1,100.00";
console.log(Number(num));
output: NaN
My requirement is If I have a number 1,800.00 it should convert to 1800 in Javascript.
Any help will be appreciated.
Thanks.