<inputtype="text"id="mass"placeholder="Mass in Kilogram"/>
<inputtype="text"id="height"placeholder="Height in meters"/>
<button>Calculate BMI</button>
<script>
const mass = document.querySelector('#mass')
const height = document.querySelector('#height')
const button = document.querySelector('button')
const bmiResult = document.createElement('p')
let bmi
button.addEventListener('click', () => {
bmi = mass.value / height.value ** 2
bmiResult.textContent = bmi.toFixed(2)
document.body.appendChild(bmiResult)
})
</script>
</body>
</html>
```
Now, we have covered most DOM topics, tomorrow I will add some contents and I will do proof reading.
🌕 Now, you are with super power, you have completed the most important part. You learned DOM and now you knew how to build a house, keep building houses. Now do some exercises for your brain and for your muscle.