Skip to content

Instantly share code, notes, and snippets.

@KMG112
Created May 5, 2015 13:14
Show Gist options
  • Save KMG112/6adeed2c348c5562b850 to your computer and use it in GitHub Desktop.
Save KMG112/6adeed2c348c5562b850 to your computer and use it in GitHub Desktop.
Javascript

Learning Javascirpt has been an experience of understanding programming in general. Seeing the difference between Javascript and ruby has allowed me to see what goes into creating a language and how each language is necessary for its own specific purpose. I am enjoying the challenge that javascript presents. The murkiness of the inner workings of javascript will keep me on my toes for many months (or years) to come. The seemingly irrational behavior at some points is intriguing, when someone creates a language I doubt that they are creating certain behaviors just to mess with the programmer so I’m curious as to why certain outcomes (especially in coercion) happen. What purpose was supposed to be fulfilled by sometimes illogical outcomes. Its like a giant murder mystery, and somewhere in the code is the killer.

Ive found lexical scoping to be pretty intuitive which makes things easier to assimilate right off the bat. Since functions are the only thing that create local scope, the rules of knowing where you are in relation to global scope are easy to keep track of at this point in my Javascript career. This also made ‘this’ easier to understand.

The hardest concept to understand so far has been the idea of closure, and I haven’t understood it until I read the ebook Eloquent Javascript. Pushing variable values down into inset functions seems like something a program language shouldn’t be able to do, yet this ability seems very useful.

@RobertAKARobin
Copy link

I'm glad you found Eloquent Javascript so valuable. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment