Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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>
Add Comment
Please, Sign In to add comment