0004 added[hypotenuseCalculator, counter, randomNumberGeneration]

This commit is contained in:
WickedJack99
2022-08-03 09:10:38 +02:00
parent 1779fcf47b
commit 037f4d11d5
8 changed files with 145 additions and 0 deletions

10
js/calcHypotenuse.js Normal file
View File

@@ -0,0 +1,10 @@
//https://youtu.be/8dWL3wF_OMw?t=2213
//Calculate hypotenuse on click of Submit-button.
document.getElementById("calcHypotenuseButton").onclick = function() {
let a = document.getElementById("sideAVal").value;
let b = document.getElementById("sideBVal").value;
let c;
c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2));
document.getElementById("hypotenuse").innerHTML = "Hypotenuse: " + c;
}