Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
chris_wot
10y ago
0 comments
Share
Especially when you need to do something like:
var that = this;
0 comments
default
newest
oldest
bryanlarsen
10y ago
That's not generally necessary in ES6 when you use "=>" to define functions. Javascript is getting better...
neurosnap
10y ago
What happens when you nest anonymous functions? Would you have to use the arrow operator at every level?
chris_wot
OP
10y ago
It's really a minor criticism and I know ES6 resolves the issue :-)
chris_wot
OP
10y ago
Through bind of course, for the silly person who downvote me. Helps to have strict mode on. Happy to have educated you!
sergiotapia
10y ago
Looking at you Ember. Ugh!
var controller = this;
Every time!
chris_wot
OP
10y ago
They have to. There's a bug in the JavaScript spec that makes you do this :-) they are perfectly correct in doing what they are doing, if they didn't then funny thing would start to happen. Sad, but true.
chris_wot
OP
10y ago
Uh, what's the reason for the downvote?
2 more replies
j
/
k
navigate · click thread line to collapse