Created
April 29, 2016 19:50
-
-
Save easierbycode/887dc2ab04d6763f9fb0979a398da027 to your computer and use it in GitHub Desktop.
new.target points to the initial constructor
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 characters
class Project { | |
constructor() { | |
console.log( new.target ); | |
} | |
} | |
class SoftwareProject extends Project { | |
constructor() { | |
super(); | |
} | |
} | |
var sp = new SoftwareProject(); | |
// constructor() { | |
// super(); | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment