Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### bind
|
||||
---
|
||||
title: bind
|
||||
tags: function,object,intermediate
|
||||
---
|
||||
|
||||
Creates a function that invokes `fn` with a given context, optionally adding any additional supplied parameters to the beginning of the arguments.
|
||||
|
||||
@ -16,4 +19,4 @@ function greet(greeting, punctuation) {
|
||||
const freddy = { user: 'fred' };
|
||||
const freddyBound = bind(greet, freddy);
|
||||
console.log(freddyBound('hi', '!')); // 'hi fred!'
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user