JavaScript ES7 Function Bind Syntax

added by bpwndaddy
6/10/2015 3:14:05 PM

3 Kicks, 310 Views

Bind your functions with this one weird trick! Sorry, I couldn’t resist. I write this post with hesitation but excitement. I have enjoyed playing around with the new ECMAScript function bind syntax as proposed here. This is a very early proposal for addition in ES2016 (ES7, whatever) and could drastically change or even be scrapped. Therefore, I recognize that this post may become obsolete. I hope by advocating for this syntax, it will get the attention it deserves so that it will become standard ES syntax. I find it to be a very versatile and welcome tool in my JavaScript arsenal.