Skip to content

Commit

Permalink
Update apC.md
Browse files Browse the repository at this point in the history
Hi there :)

Let me start by thanking you for this incredible resource. It is really helping me understand this language, and I am really looking forward to using what I am learning.

I thought I would propose a change in this instance. I didn't understand what an 'end-around' was until I did some wikipedia research and found out that it is a tactic from American Football. I feel that this is obscure enough a reference to cloud the intent of the sentence (in fact, I'm not 100% sure I have demonstrated in my edit that I have properly understood it). Please consider making this change.

Again, thank you for your work in the open source/JavaScript community.

All the best,

Mike
  • Loading branch information
mdouglasbrett committed Aug 7, 2015
1 parent 072e07e commit 422b1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scope & closures/apC.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var obj = {
obj.cool(); // awesome?
```

Without getting too much into the weeds here, the `var self = this` "solution" just ends-around the whole problem of understanding and properly using `this` binding, and instead falls back to something we're perhaps more comfortable with: lexical scope. `self` becomes just an identifier that can be resolved via lexical scope and closure, and cares not what happened to the `this` binding along the way.
Without getting too much into the weeds here, the `var self = this` "solution" just dispenses with the whole problem of understanding and properly using `this` binding, and instead falls back to something we're perhaps more comfortable with: lexical scope. `self` becomes just an identifier that can be resolved via lexical scope and closure, and cares not what happened to the `this` binding along the way.

People don't like writing verbose stuff, especially when they do it over and over again. So, a motivation of ES6 is to help alleviate these scenarios, and indeed, *fix* common idiom problems, such as this one.

Expand Down

0 comments on commit 422b1c6

Please sign in to comment.