diff --git a/_posts/en/2017-01-19-binding-objects-to-functions.md b/_posts/en/2017-01-19-binding-objects-to-functions.md index 11ae3b8d..e2233d15 100644 --- a/_posts/en/2017-01-19-binding-objects-to-functions.md +++ b/_posts/en/2017-01-19-binding-objects-to-functions.md @@ -38,19 +38,19 @@ A copy of the given function along with the specified `this` value and initial a ```js const myCar = { brand: 'Ford', - type: 'Sedan' - Color: ‘Red’ + type: 'Sedan', + color: 'Red' }; -const getBrand = () => { +const getBrand = function() { console.log(this.brand); }; -const getType = () => { +const getType = function() { console.log(this.type); }; -const getColor = () => { +const getColor = function() { console.log(this.color); }; @@ -60,6 +60,6 @@ getBrand(myCar); // object not bind,undefined getType.bind(myCar)(); // Sedan -getColor.bind(myCar); // Red +getColor.bind(myCar)(); // Red -``` \ No newline at end of file +```