diff --git a/app.js b/app.js index ec10f3e..4197614 100644 --- a/app.js +++ b/app.js @@ -1 +1,12 @@ -console.log('hi'); +const lowest = 27.5 +const highest = 4186 +const range = highest - lowest + +const generateButton = document.querySelector('body > button') +const toneDisplay = document.querySelector('section dd') +let newTone + +generateButton.addEventListener('click', () => { + newTone = Math.random() * range + lowest + toneDisplay.innerHTML = newTone +}) diff --git a/index.html b/index.html index abe16b7..86e791d 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,18 @@ - +

Tuner

- + +
+
+
Tone:
+
+
+ + +