Not a language but a framework feature, but jQuery's inArray() method is the most idiotic thing I've ever seen. It returns -1 if the value is not in the array, and the value's index if it is.
Also, since its function is exactly the same as Array.IndexOf() and since the index is what it is actually returning, why didn't they just call it IndexOf()?
*more or less. The fact alone that these kinds of caveats are necessary makes loose typing my top malicious language feature.