Skip to content

Comment on Map JavaScript APIparent

Comments

Totally. And if you do need to support older browsers without a native `bind`, Underscore is your friend. There's not been a need to write `var me = this` or similar for a long time (or ever, really) but unfortunately you do still see a lot of - even very recent - code littered with it.

Is it really unfortunate? It's a matter of opinion. I find a single `var self = this;` to be much more readable than many .bind(this) calls when you're several levels deep.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.