Compare commits
No commits in common. "2a5ef56d42e2b2119e386f47e08195f1a75acbfb" and "2ad74832503a9964f4cff21fb339e07c034188a0" have entirely different histories.
2a5ef56d42
...
2ad7483250
17
app.js
17
app.js
|
@ -1,6 +1,11 @@
|
||||||
function display(char1, char2, char3, char4, ...others) {
|
let person1 = {
|
||||||
console.log(others);
|
name: 'Mary',
|
||||||
console.log(char1, char2, char3, char4);
|
getName: function(){
|
||||||
}
|
return this.name;
|
||||||
let letters = 'abcdefgh';
|
}
|
||||||
display(...letters);
|
};
|
||||||
|
let person2 = {
|
||||||
|
name: 'John'
|
||||||
|
};
|
||||||
|
let getNameCopy = person1.getName.bind(person2); // won't change context of function
|
||||||
|
console.log(getNameCopy());
|
Loading…
Reference in New Issue