Aaron Crowder avatar

Aaron Crowder

Hi, I'm Aaron Crowder. Or—if you know me online—CrowderSoup.

Father of two, Software developer, and lover of the open web. I like to take things apart (and sometimes even put them back together). I can frequently be found tinkering with some bit of code in my spare time.

Managing Scope Using Call, Apply, and Bind

From the archive (2015). Some of this may be out of date. Call Calls a function, with the specified arguments passed in The first argument becomes this, the rest are passed in as regular arguments. Using call allows you to maintain the scope of this accross methods. It works like this: Here we're using prototypical inheritance to allow us to inheirit properties from Animal in Dog and Cat. Using call allows us to invoke Animal to initialize it's properties while maintaining the correct sco...

Read more

JavaScript: Arrays with Named Properties

From the archive (2015). Some of this may be out of date. Adding named properties to arrays in JavaScript can be handy in a few different cases. For instance: You need a nice formatted title / description for a data set. Rather than having multiple objects you can use named properties and get away with only using one. You want to add some functions to an array for whatever reason Lots of other reasons that I can't think of right now! Basically, this just buys you a nice way to encapsulate...

Read more