Last active
July 22, 2018 10:58
-
-
Save dgloriaweb/07dfd3a3fc3b2752d2e92695998ddd9f to your computer and use it in GitHub Desktop.
Javascript Demo// source http://jsbin.com/murajar
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Javascript Demo</title> | |
<link rel="stylesheet" type="text/css" href="css.css" /> | |
<script type="text/javascript" src="jsC.js"></script> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function Shape(shapeName) | |
{ | |
this.shapeName=shapeName; | |
Shape.Count =++Shape.Count||1; | |
Shape.showCount= function(){ | |
return Shape.Count; | |
} | |
} | |
var shape1 = new Shape("circle"); | |
var shape2 = new Shape("line"); | |
var shape3 = new Shape("triangle"); | |
var shape4 = new Shape("askdlfl"); | |
document.write(Shape.showCount()); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function Shape(shapeName) | |
{ | |
this.shapeName=shapeName; | |
Shape.Count =++Shape.Count||1; | |
Shape.showCount= function(){ | |
return Shape.Count; | |
} | |
} | |
var shape1 = new Shape("circle"); | |
var shape2 = new Shape("line"); | |
var shape3 = new Shape("triangle"); | |
var shape4 = new Shape("askdlfl"); | |
document.write(Shape.showCount()); | |
</script></body> | |
</html> |
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
function Shape(shapeName) | |
{ | |
this.shapeName=shapeName; | |
Shape.Count =++Shape.Count||1; | |
Shape.showCount= function(){ | |
return Shape.Count; | |
} | |
} | |
var shape1 = new Shape("circle"); | |
var shape2 = new Shape("line"); | |
var shape3 = new Shape("triangle"); | |
var shape4 = new Shape("askdlfl"); | |
document.write(Shape.showCount()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment