Skip to content

Instantly share code, notes, and snippets.

@johnloy
Last active January 20, 2020 21:59
Show Gist options
  • Save johnloy/b911e4042c10a768878d3e1201eb898d to your computer and use it in GitHub Desktop.
Save johnloy/b911e4042c10a768878d3e1201eb898d to your computer and use it in GitHub Desktop.
Unbound array function in JS using Function.prototype.bind
const filter = Function.prototype.call.bind(Array.prototype.filter)
filter([1,2,3], (x) => x > 1 )
@johnloy
Copy link
Author

johnloy commented Jan 16, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment