Ask a Question

String comparison failure

SOLVED
shehbashahab
New Contributor

String comparison failure

Why is JScript is evaluating "15 000,00" == "15 000,00" as false?
2 REPLIES 2
Philip_Baird
Community Expert

Hi S S, try using the === operator, you may be experiencing type coercion issues around using the == operator as detailed here http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm



Regards

Phil Baird
shehbashahab
New Contributor

Actually it was a hidden character issue. Replacing the space ' '(Unicode value:160) with space ' '(Unicode value:32) resolved the comparison failure.
cancel
Showing results for 
Search instead for 
Did you mean: