Skip to content

Instantly share code, notes, and snippets.

@dgloriaweb
Last active July 23, 2018 09:10
Show Gist options
  • Save dgloriaweb/9c0719819808a62b7c3aaba7f66ffef7 to your computer and use it in GitHub Desktop.
Save dgloriaweb/9c0719819808a62b7c3aaba7f66ffef7 to your computer and use it in GitHub Desktop.
Javascript Demo// source http://jsbin.com/murajar
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Javascript Demo - abstract class</title>
<link rel="stylesheet" type="text/css" href="css.css" />
<script type="text/javascript" src="jsC.js"></script>
</head>
<body>
<script id="jsbin-javascript">
var Shape=function(){
this.shapeName=none;
throw new Error("kjfkj");
}
Shape.prototype.draw=function(){
return "Drawing "+this.shapeName;
}
var Circle = function(shapeName)
{
this.shapeName=shapeName;
}
Circle.prototype =Object.create(Shape.prototype);
var circle = new Circle("circle");
document.write( circle.draw());
</script>
<script id="jsbin-source-javascript" type="text/javascript">var Shape=function(){
this.shapeName=none;
throw new Error("kjfkj");
}
Shape.prototype.draw=function(){
return "Drawing "+this.shapeName;
}
var Circle = function(shapeName)
{
this.shapeName=shapeName;
}
Circle.prototype =Object.create(Shape.prototype);
var circle = new Circle("circle");
document.write( circle.draw());</script></body>
</html>
var Shape=function(){
this.shapeName=none;
throw new Error("kjfkj");
}
Shape.prototype.draw=function(){
return "Drawing "+this.shapeName;
}
var Circle = function(shapeName)
{
this.shapeName=shapeName;
}
Circle.prototype =Object.create(Shape.prototype);
var circle = new Circle("circle");
document.write( circle.draw());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment