Skip to content

Instantly share code, notes, and snippets.

@dewey92
Created February 28, 2019 00:29
Show Gist options
  • Select an option

  • Save dewey92/884a150f02dd61238349e802f9852953 to your computer and use it in GitHub Desktop.

Select an option

Save dewey92/884a150f02dd61238349e802f9852953 to your computer and use it in GitHub Desktop.
Partial App bind - JS
const fillNames = (firstN, middleN, lastN) =>
firstN + middleN + lastN
const a = fillNames.bind(null, 'Jihad');
const b = a(' Dzikri', ' Waspada')
b === 'Jihad Dzikri Waspada' // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment