Camel Case - xhr.onreadystatechange (solved - it just is, now eat your food Johnny)



Why is the following property of xhr not camelcased?:


According to it is not camel cased, so I guess it’s just one of those things. Nothing to see here folks, just human written code!


i would be careful with the use of w3schools:

its not that you can’t use w3schools, but you have to be careful.

That is weird, properties are usually cammelcase. I would personally not worry about it, someone implemented this method and decide not to use cammelcase. Personally not something i would focus on



Thanks for the insight, I’ll check it out :upside_down_face:

I found this comment on a teamtreehouse forum:

A lot of the javascript events don’t follow the camel case conventions (onclick, onmouseover, …). So I guess the rule of thumb is that your methods should be camel case, but don’t always expect events to follow suit because many were created before casing conventions became uniform.


I just went searching the web for this very question. The answer above appears to be the most widely accepted. I can live with it.