Created
November 27, 2017 14:04
-
-
Save seogi1004/e64d1c4b2c83a89507abd5ea8efd1c6d to your computer and use it in GitHub Desktop.
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
var Parent = function() { | |
this.print= function() { | |
alert("My name is " + this.getName()); | |
}; | |
}; | |
var Children = function(name) { | |
this.name = name; | |
this.getName = function() { | |
return this.name; | |
}; | |
}; | |
Children.prototype = new Parent; | |
var children = new Children('Moon-Hak-I'); | |
children.print(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment