Compare commits

..

No commits in common. "2a5ef56d42e2b2119e386f47e08195f1a75acbfb" and "2ad74832503a9964f4cff21fb339e07c034188a0" have entirely different histories.

1 changed files with 11 additions and 6 deletions

17
app.js
View File

@ -1,6 +1,11 @@
function display(char1, char2, char3, char4, ...others) {
console.log(others);
console.log(char1, char2, char3, char4);
}
let letters = 'abcdefgh';
display(...letters);
let person1 = {
name: 'Mary',
getName: function(){
return this.name;
}
};
let person2 = {
name: 'John'
};
let getNameCopy = person1.getName.bind(person2); // won't change context of function
console.log(getNameCopy());