Created
September 8, 2020 06:50
-
-
Save jcchurch/e7af40850a69e2f50b55f9931aadfdbf to your computer and use it in GitHub Desktop.
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
class MyClass { | |
myVar: string = "Hello "; | |
greet(name: string) { | |
return this.myVar + name; | |
} | |
} | |
let x = new MyClass(); | |
console.log(x.greet("James")); | |
let y = x.greet; | |
console.log(y("James")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment