Compare commits
No commits in common. "2a5ef56d42e2b2119e386f47e08195f1a75acbfb" and "2ad74832503a9964f4cff21fb339e07c034188a0" have entirely different histories.
2a5ef56d42
...
2ad7483250
15
app.js
15
app.js
|
@ -1,6 +1,11 @@
|
|||
function display(char1, char2, char3, char4, ...others) {
|
||||
console.log(others);
|
||||
console.log(char1, char2, char3, char4);
|
||||
let person1 = {
|
||||
name: 'Mary',
|
||||
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