MadnessRed Posted December 6, 2009 Share Posted December 6, 2009 If a problem that a script is not colouring a number as expected. I have this if(a >= b){ colour = 1 }else{ alert(a + '<' + b); } however, it returns an alert saying 12349414.9041 < 15000 Any idea as to why this might be happening? actually i think I have worked it out, it is reading teh vaues as string and < refers to its alphabetic position, eg 'aa' < 'z' '11' < '9' I have done a parseFloat and that sorted it. Link to comment https://forums.phpfreaks.com/topic/184179-boolean-being-bizare-saying-123494149041-15000/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.