git @ Cat's Eye Technologies The-Dipple / master javascript / inheritance.html
master

Tree @master (Download .tar.gz)

inheritance.html @masterraw · history · blame

<!DOCTYPE html>
<!--
SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
For more information, please refer to <https://unlicense.org/>
SPDX-License-Identifier: Unlicense
-->
<head>
  <meta charset="utf-8">
  <title>Javascript Inheritance</title>
  <script src="inheritance.js"></script>
</head>
<body>

<h1>Hi</h1>

</body>
<script>
  var st1 = new Subthing();
  st1.init(40);
  st1.weigh();
  var st2 = new Subthing();
  st2.init(20);
  st2.weigh();
  st1.weigh();
</script>