JavaScript: Function Invocation Patterns
doctrina.org
JavaScript: Function Invocation Patterns
1–10 of 52 posts
Re: JavaScript: Function Invocation Patterns
#2[Reason: 'this.value++;' in the method invocation refers to obj.value, since 'this' is bound to 'obj'. Only in the innerFunction function invocation does 'this' bind to the global object.]
Re: JavaScript: Function Invocation Patterns
#3Not sure these are patterns rather than just language features.
Re: JavaScript: Function Invocation Patterns
#4Should have mentioned call along with apply. Not sure these are patterns rather than just language features.
Re: JavaScript: Function Invocation Patterns
#5 Please don't do things to make titles stand out, like using
uppercase or exclamation points, or adding a parenthetical
remark saying how great an article is. It's implicit in
submitting something that you think it's important.
plus i have a very strong distain about anyone or anything (i.e. headlines) which tell me what i MUST do / know / think... - also the article above is about a very basic language feature of JS that hopefully anyone who has every touched JS already knows about.Re: JavaScript: Function Invocation Patterns
#6There's an error in his first 'Function Invocation' example, the answer is 500, not 501. [Reason: 'this.value++;' in the method invocation refers to obj.value, since 'this' is bound to 'obj'. Only in the innerFunction function invocation does 'this' bind to the global object.]
Re: JavaScript: Function Invocation Patterns
#7please see the HN guidelines http://ycombinator.com/newsguidelines.html Please don't do things to make titles stand out, like using uppercase or exclamation points, or adding a parenthetical remark saying how great an article is. It's implicit in submitting something that you think it's important. plus i have a very strong distain about anyone or anything (i.e. headlines) which tell me what i MUST do / know / think..…
Re: JavaScript: Function Invocation Patterns
#8please see the HN guidelines http://ycombinator.com/newsguidelines.html Please don't do things to make titles stand out, like using uppercase or exclamation points, or adding a parenthetical remark saying how great an article is. It's implicit in submitting something that you think it's important. plus i have a very strong distain about anyone or anything (i.e. headlines) which tell me what i MUST do / know / think..…
But enough burying the lede. The issue I have with this title is simple: It's not clear WHY I must know these patterns: The focus of the post is not why I must know them, but rather This post explains the four patterns, how to use them and what to watch out for. Had the post kicked off by explaining that not knowing one or more of these patterns could lead to disaster, I'd be onside with the submission title rewrite (sans emphasis).