I wish javascript had some kind of flag so you could get it to act sanely. All the comparison operators would work like they do in sane languages; type conversion wouldn't be quite so automatic and insane, etc.
The error in this case would be forgetting Javascript's rules of implicit conversion.
Adding a float to a string results in a string.