My background is in C and I've picked up PHP, mySQL, HTML, CSS without too much issue.
- It seems to violate a number of traditional programming principles (e.g. variable scope)
- Undefined variables seem to appear out of nowhere and already have values associated with them. For example (from the jQuery docs):
.append('default ' + event.type + ' prevented')
What exactly is "event"? Do I have to use this variable name? Should I just assume that this object is magically instantiated with the right stuff and I can use any of the methods list at the JQuery API?
- There seems to be bunch of random rules (e.g. return false to stop a default action, but sometimes this doesn't work?)
- Non-deterministic behavior when debugging. (e.g. I refresh the browser, try something and get result X for JS variables I'm watching in Firebug. I refresh again and I get result Y?)
- Very messy looking code that is hard to follow. What happens when? I'm using Firebug and Chrome Developer Tools, but I'm not getting enough visibility.
It seems like everyday there's some random JS "rule" that comes up that I've never seen before in any of my JS books or tutorials.