Skip to content

Instantly share code, notes, and snippets.

@appcoreopc
Created March 25, 2016 05:56
Show Gist options
  • Save appcoreopc/daa86436b620105e211a to your computer and use it in GitHub Desktop.
Save appcoreopc/daa86436b620105e211a to your computer and use it in GitHub Desktop.
// In the getSalary example, we bind an object and provide 1st argument = "jessica"
var jessica_partial_calculation = getSalary.bind(jessica, "jessica"); // here we bind and provide the first "argument".
// after some processing .....
// now we will provide the next argument //
jessica_partial_calculation(100); // output : jessica gets a monthly salary of :2800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment