subtracting javascript button
button for group 6 hacks
Subtracting 2 Numbers
<!-- function is called here -->
<button id="enter" onclick="print(a,b)">Subtract</button>
<p id="result"></p>
<!-- javascript -->
<script>
function print(a,b) {
document.getElementById("result").innerHTML = a - b // math
}
// variables are defined
var a = 1
var b = 2
</script>