Created
October 29, 2017 21:19
-
-
Save jorotenev/d4c879c674d5bddac1df0c8252ddeb93 to your computer and use it in GitHub Desktop.
Revisions
-
jorotenev created this gist
Oct 29, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ class SomeClass { public a; public b; constructor() { this.a = '1'; this.b = [] } one = () => { console.log(`one = () => {} ${this.a}`) this.b.push('one') } two() { console.log(`two() {} ${this.a}`) this.b.push('two') } three = function () { console.log(`three = funciton() {} ${this.a}`) this.b.push('three') } } let someClassObj = new SomeClass(); someClassObj.one() someClassObj.two() someClassObj.three() console.log(someClassObj.b) // Outputs // one = () => {} 1 // public two() {} 1 // three = funciton() {} 1 // ["one", "two", "three"]