<html>

<body>
    <center id="output">
        <button onclick="run()">Run</button>
        <p>Output:</p>
        </br>
    </center>
</body>

</html>
button {
    background: #ff4848;
    color: #c2ffd9;
}
function parent(parentName) {
  return function child(childName) {
    print(parentName + ' ' + childName);
  }
}

const child = parent('Bitcoin');

function run() {
    child('Dogecoin');
}





















function print(msg) {
    document.getElementById("output").innerHTML += msg + "</br>";
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.