-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPolyFill.js
More file actions
33 lines (29 loc) · 778 Bytes
/
PolyFill.js
File metadata and controls
33 lines (29 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// let user = {
// firstName: 'Prashant',
// lastName: 'Maurya',
// };
// let printName = function (homeTown, city, state, country) {
// console.log(
// this.firstName +
// ' ' +
// this.lastName +
// ' lives in ' +
// homeTown +
// ', ' +
// city +
// ', ' +
// state +
// ', ' +
// country
// );
// };
// let printMyName = printName.bind(user, 'Jankipuram', 'Lucknow');
// printMyName('Uttar Pradesh', 'India');
// Function.prototype.myBind = function (user, ...args1) {
// let obj = this;
// return function (...args2) {
// obj.apply(user, [...args1, ...args2]);
// };
// };
// let printMyName2 = printName.myBind(user, 'Jankipuram');
// printMyName2('Lucknow', 'Uttar Pradesh', 'India');