-
This post is part of a series called the Guided Tours . In this second installment we are still looking inside the jQuery code. Trust me, even if it's hard to digest, you can still learn enough if you focus on a little bit at a time. The code we are interested in today is the following. //from jQuery...
-
This post is part of a series called the Guided Tours . I'm sure I'm not alone when I say that one of the best ways to improve our coding skills is by reading code written by someone else. Sometimes we don't realize how lucky we are to have so much source code at our fingertips, namely Open...
-
This post is part of a series called JavaScript Demystified . This particular chapter is further divided in two parts. Read Part 1 . Build your own hierarchy Let's pretend we are building some scripts that deal with musical instruments. We could define our own Guitar class type like this: //The constructor...
-
This post is part of a series called JavaScript Demystified . This particular chapter is further divided in two parts. Read Part 2 . In a previous installment in this series we saw how we could create constructor functions in JavaScript. Back then I just mentioned that we don't have classes in JavaScript...
-
This post is part of a series called JavaScript Demystified . I'm pretty sure by now you have heard at least once that eval is evil . Some nuggets from Eric Lippert's post: if you are considering using eval then there is probably a better way People, eval starts a compiler. I'm also pretty...
-
This post is part of a series called JavaScript Demystified . In our last installment in this short JavaScript series we took a look at closures. In some of the examples, we saw functions being declared (and returned) inside other functions. The capability of declaring a function inside another one is...
-
This post is part of a series called JavaScript Demystified . When I wrote about functions in JavaScript I mentioned that functions are more than just a block of code: Function is a standard data type in JavaScript, an object indeed; you can pass them around and copy them. Let's take a look at this...
-
This post is part of a series called JavaScript Demystified . Time after time I find JavaScript code that has bugs caused by lack of proper understanding of how functions work in JavaScript (a lot of that code has been written by me, by the way.) JavaScript has functional programming characteristics...
-
Language Envy: This post is part of a series where I wish C# had a particular feature I came to like when working with other programming languages. It's easy to let a small language feature go unnoticed. The more I spend time writing JavaScript and Ruby, the more one little detail shows itself loud...