Level: Introductory to Intermediate
In this session, we'll make fun of JavaScript, but learn something by doing so. JavaScript can be a passive-aggressive and fickle language that frustrates you at every turn. It lets you do things like declare variables anywhere, but doesn't tell you that it will hoist them while you're not looking. JavaScript's 'this' keyword is anything but, and eval can turn good code to evil fast. In this session that blends comedy and learning, we'll discuss common JavaScript headaches and mistakes and fun ways to avoid them. Learn what can trick you, like the 'this' keyword, JavaScript scoping, evil Eval, and the use of the 'with' statement (wait... what?). All that alongside those gotchas is the fact that not all equality operators are created equal, and that innocent looking parseInt - it does force parses. Sit back and dig into the fun of JavaScript language quirks.
You will learn:
- JavaScript gotchas
- Language quirks
- How to lint code so as to avoid gotchas