Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created July 15, 2010 15:00
Show Gist options
  • Save petyosi/477062 to your computer and use it in GitHub Desktop.
Save petyosi/477062 to your computer and use it in GitHub Desktop.
<html>
<head><script type="text/javascript">
function A() {
}
A.prototype = {
b : function() {
alert("b called")
}
}
function B() {
}
B.prototype = {
__proto__ : A.prototype,
c : function() {
alert("c called");
},
b : function() {
alert("new b called");
}
}
var c = new B();
c.b();
c.c();
</script>
</head>
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment