Last active
September 5, 2017 07:04
-
-
Save lspdv/549eea3286312c5a77b4e37d8ad95f95 to your computer and use it in GitHub Desktop.
Finish line `var sayHello = ` so the whole code example prints "Hello John" to the console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Finish line `var sayHello = ` so the whole code example prints "Hello John" to the console | |
//Please answer fill only to the registration form for MSD Code Academy :-) | |
var hello = { | |
name: 'John', | |
sayHello: function() { | |
return 'Hello ' + this.name | |
} | |
} | |
var sayHello = ... | |
console.log(sayHello()) | |
//A: var sayHello = hello.sayHello | |
//B: var sayHello = hello.sayHello() | |
//C: var sayHello = hello.sayHello.call(hello) | |
//D: var sayHello = hello.sayHello.bind(hello) | |
//E: Have no idea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment