Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### partial
|
||||
---
|
||||
title: partial
|
||||
tags: function,intermediate
|
||||
---
|
||||
|
||||
Creates a function that invokes `fn` with `partials` prepended to the arguments it receives.
|
||||
|
||||
@ -12,4 +15,4 @@ const partial = (fn, ...partials) => (...args) => fn(...partials, ...args);
|
||||
const greet = (greeting, name) => greeting + ' ' + name + '!';
|
||||
const greetHello = partial(greet, 'Hello');
|
||||
greetHello('John'); // 'Hello John!'
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user