SyntaxFix
Write A Post
Hire A Developer
Questions
Have you ever tried to do this? :p
var str = '3.8';ie alert( +(str) + 0.2 );
+(string) will cast string into float.
Handy!
So in order to solve your problem, you can do something like this:
var floatValue = +(str.replace(/,/,'.'));